diff --git a/Directory.Build.props b/Directory.Build.props
index 5ff9a6c..d574c8d 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -9,7 +9,7 @@
Domain Primitives
ALTA Software llc.
Copyright © 2024 ALTA Software llc.
- 2.2.1
+ 2.2.3
diff --git a/src/AltaSoft.DomainPrimitives/SwaggerGenOptionsExt.cs b/src/AltaSoft.DomainPrimitives/SwaggerGenOptionsExt.cs
index b0626f5..f382398 100644
--- a/src/AltaSoft.DomainPrimitives/SwaggerGenOptionsExt.cs
+++ b/src/AltaSoft.DomainPrimitives/SwaggerGenOptionsExt.cs
@@ -36,14 +36,17 @@ public static void AddAllDomainPrimitivesSwaggerMappings(this SwaggerGenOptions
.Where(a => IsSystemAssembly(a.FullName)).Select(a => a.FullName!));
var assembliesToCheck = new Queue(AppDomain.CurrentDomain.GetAssemblies());
+ var processedPrimitiveAssemblies = new HashSet();
while (assembliesToCheck.Count > 0)
{
var assembly = assembliesToCheck.Dequeue();
- if (assembly.GetCustomAttribute() is not null)
+ if (!processedPrimitiveAssemblies.Contains(assembly) &&
+ assembly.GetCustomAttribute() is not null)
{
ProcessAssembly(assembly, options);
+ processedPrimitiveAssemblies.Add(assembly);
}
foreach (var reference in assembly.GetReferencedAssemblies())