Skip to content

OpenApi Json schema is incorrect in Dotnet version 9.0.4 #61717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
itroncolinis opened this issue Apr 28, 2025 · 0 comments
Open
1 task done

OpenApi Json schema is incorrect in Dotnet version 9.0.4 #61717

itroncolinis opened this issue Apr 28, 2025 · 0 comments
Labels
area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc feature-openapi

Comments

@itroncolinis
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Even if Dotnet version 9.0.4 is supposed to fix #60339, a minimal model in the repro project emits wrong Json shema

Expected Behavior

In the repro project, I expect the correct Json schema to be created at https://localhost:7295/openapi/v1.json

Image

but the wrong schema is created:

Image

If you uncomment the code in Program.cs lines 11-14, a schema transformer is applied and the correct schema is generated.

Steps To Reproduce

Clone repro solution at

https://github.com/itroncolinis/openapibug

Launch the application and verify the json schema at https://localhost:7295/openapi/v1.json

Exceptions (if any)

No response

.NET Version

9.0.203

Anything else?

My IDE is Visual Studio 2022 (Version 17.13.6)

dotnet--info-output.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc feature-openapi
Projects
None yet
Development

No branches or pull requests

2 participants