Skip to content

Commit b128172

Browse files
authored
Fix loop detector OpenApiSchema.
Missed settings.LoopDetector.PopLoop<OpenApiSchema> in SerializeAsV2
1 parent ac55390 commit b128172

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Microsoft.OpenApi/Models/OpenApiSchema.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,11 @@ internal void SerializeAsV2(
536536
}
537537

538538
target.SerializeAsV2WithoutReference(writer, parentRequiredProperties, propertyName);
539+
540+
if (Reference != null)
541+
{
542+
settings.LoopDetector.PopLoop<OpenApiSchema>();
543+
}
539544
}
540545

541546
/// <summary>

0 commit comments

Comments
 (0)