Skip to content

🐛 Fix infinite recursion in the ASP.NET Core OpenApi schema transformer - #39

Merged
desjoerd merged 1 commit into
mainfrom
fix/aspnetcore-openapi
Oct 20, 2026
Merged

desjoerd merged 1 commit into
mainfrom
fix/aspnetcore-openapi

Conversation

@desjoerd

Copy link
Copy Markdown
Owner

The OptionalValuesSchemaTransformer now tracks underlying types whose schema is currently being generated. When a circular reference (e.g. A -> B -> C -> A) is detected, the property is annotated with x-schema-id so the framework resolves it to a $ref instead of recursing. Nullability is preserved via x-is-nullable-property.

Enable the circular-reference test endpoints now that dotnet/aspnetcore#64109 is available, and bump Microsoft.Extensions.ApiDescription.Server to 10.0.11.

The OptionalValuesSchemaTransformer now tracks underlying types
whose schema is currently being generated. When a circular
reference (e.g. A -> B -> C -> A) is detected, the property is
annotated with x-schema-id so the framework resolves it to a $ref
instead of recursing. Nullability is preserved via
x-is-nullable-property.

Enable the circular-reference test endpoints now that
dotnet/aspnetcore#64109 is available,
and bump Microsoft.Extensions.ApiDescription.Server to 10.0.11.
@desjoerd
desjoerd merged commit 932df39 into main Oct 20, 2026
1 check passed
@desjoerd
desjoerd deleted the fix/aspnetcore-openapi branch October 20, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant