When using JsonPolymorphic with derived types that share a common base class and have similar property structures, the OpenAPI generator throws an exception during schema generation. #62068
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
feature-openapi
Uh oh!
There was an error while loading. Please reload this page.
Is there an existing issue for this?
Describe the bug
When using JsonPolymorphic with derived types that share a common base class and have similar property structures, the OpenAPI generator throws an exception during schema generation.
Data.cs
Program.cs
Expected Behavior
OpenAPI schema should be generated without throwing an exception.
Steps To Reproduce
reproduce
dotnet run
curl http://localhost:5148/openapi/v1.json
Exceptions (if any)
.NET Version
9.0.201
Anything else?
Microsoft.AspNetCore.OpenApi 9.03
The text was updated successfully, but these errors were encountered: