Skip to content

Update to .NET 9 and replace Swashbuckle/Swagger with ASP.NET Core OpenAPI generation #27

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

Merged
merged 5 commits into from
Dec 12, 2024

Conversation

jasonjoh
Copy link
Member

Since .NET 9 brings OpenAPI doc generation natively to ASP.NET Core, we no longer need the Swashbuckle dependency. This does introduce a few changes to note.

  • The new generation only supports JSON document format. YAML format is planned but unclear when it will land. See Support emitting OpenAPI documents in YAML format dotnet/aspnetcore#58516
  • New generation does not support consuming info from XML comments, so I had to move some things into attributes. The biggest gap here is the loss of example values in the schemas.
  • Removing Swashbuckle means no more SwaggerUI page.

On a positive note, the OpenAPI is generated at build time rather than at run time.

@jasonjoh jasonjoh merged commit 7055811 into main Dec 12, 2024
4 checks passed
@jasonjoh jasonjoh deleted the net9 branch December 12, 2024 18:35
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