"dotnet new webapiaot" should include OpenAPI support #59564
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
feature-openapi
NativeAOT
Milestone
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
When I try to create an ASP.NET Core project with AOT support, I can use
dotnet new webapiaot
. I can add the--help
flag to see available options:That's quite limited!
I can also create a project without AOT support by using
dotnet new webapi
. This has a lot more options:Click to view code
The problem is that the AOT template doesn't have OpenAPI support by default, while the non-AOT version does support OpenAPI by default.
This is understandable, as .NET 8 didn't contain an AOT compatible OpenAPI implementation. However, NET 9 received improved OpenAPI support with AOT support: https://devblogs.microsoft.com/dotnet/dotnet9-openapi/.
This is not included by default in the .NET 9
webapiaot
template, nor is it a flag like it is fordotnet new webapi
(--no-openapi
).I understand there are a smaller amount of supported flags as AOT support is quite new, but I would like to see it added.
Describe the solution you'd like
OpenAPI is important for complex API's or API's that are consumed by API clients, like front-ends or other API's. If it is supported for non-aot projects, I would like to see it supported for AOT projects, too!
Additional context
I wouldn't mind creating a PR myself if the team agrees this could be useful!
The text was updated successfully, but these errors were encountered: