Skip to content
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

[Epic] OpenAPI in .NET 7 #37098

Closed
rafikiassumani-msft opened this issue Sep 29, 2021 · 4 comments
Closed

[Epic] OpenAPI in .NET 7 #37098

rafikiassumani-msft opened this issue Sep 29, 2021 · 4 comments
Assignees
Labels
area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc area-web-frameworks *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels Epic Groups multiple user stories. Can be grouped under a theme. feature-minimal-actions Controller-like actions for endpoint routing feature-openapi Priority:0 Work that we can't release without triage-focus Add this label to flag the issue for focus at triage

Comments

@rafikiassumani-msft
Copy link
Contributor

rafikiassumani-msft commented Sep 29, 2021

(*) ‼️ = Prevents users from successfully using OpenAPI, 🔨 = Improves the experience for using OpenAPI
S = A few hours
M = A few days
L = About a week
XL = Multiple weeks

Issue Category Impact (*) Priority Size Status
Route constraints don't produce appropriate information in OpenAPI schema (#36525) aspnetcore-bugs ‼️ P0 M ✅ (7.0-preview1)
ASP.NET Core templates that include both Open API and Authentication should include scaffolding for Swagger to authenticate users (#36185) aspnetcore-features 🔨 P1 S ❌ Superseded by #39761
Support Deprecated in Minimal APIs for Open API (#35091) aspnetcore-features 🔨 P2 S ✅ (7.0-preview4)
Support setting server on PathItem or Operation for each endpoint/controller/action aspnetcore-features ‼️ P1 S ✅ (7.0-preview4)
Respect EndpointGroupName attributes in MVC ApiExplorer (#35055) aspnetcore-bugs ‼️ P0 S ✅ (7.0-preview1)
Support minimal APIs in NSwag (RicoSuter/NSwag#3560) partner-features 🔨 P1 M ✅ (7.0-preview1)
Automatically set endpoint metadata for minimal APIs (#34544) aspnetcore-features 🔨 P1 M
Create an analyzer to help verify and fix endpoint metadata of minimal APIs (#34543) aspnetcore-features, analyzers 🔨 P1 L
Support authentication and authorization in OpenAPI (#34546) aspnetcore-features ‼️ P0 L ❌ Closed as a dupe of #39761
DateOnly and TimeOnly are displayed as complex objects in open-api schemas rather simple string (#37045) aspnetcore-bugs 🔨 P2 S ❌ DateOnly and TimeOnly not supported by JSON schema
Generating REST Clients for .NET Minimal / Web API APIs (#36636) aspnetcore-features 🔨 P1 XL
API analyzers should support undeclared status codes (#15385) aspnetcore-bugs, analyzers 🔨 P3 M
API analyzer doesn't recognize ControllerBase.ValidationProblem (#6061) aspnetcore-bugs, analyzers 🔨 P3 M
ProblemDetails is not returned for 404NotFound and 500Exception (#4953) aspnetcore-bugs 🔨 P3 S ❌ Not actually OpenAPI
Mvc.Api.Analyzers not recognizing methods from a Base Class (#4410) aspnetcore-bugs 🔨 P3 M
Security schemes cannot be generated for individual endpoints/actions aspnetcore-bugs ‼️ P0 M
Descriptions and examples cannot be set for endpoints or controllers (#37906) aspnetcore-bugs ‼️ P0 S ✅ (7.0-preview4)
Share more RequestDelegateFactory.CreateArgument logic (#33644) aspnetcore-bugs 🔨 P2 M
@rafikiassumani-msft rafikiassumani-msft added feature-openapi feature-minimal-actions Controller-like actions for endpoint routing area-web-frameworks *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels labels Sep 29, 2021
@BrennanConroy BrennanConroy added this to the .NET 7 Planning milestone Sep 30, 2021
@BrennanConroy BrennanConroy added the Epic Groups multiple user stories. Can be grouped under a theme. label Sep 30, 2021
@captainsafia captainsafia changed the title Open- API issues for .NET7 Planning [EPIC] OpenAPI in .NET 7 Oct 1, 2021
@rafikiassumani-msft rafikiassumani-msft changed the title [EPIC] OpenAPI in .NET 7 [Epic] OpenAPI in .NET 7 Dec 27, 2021
@rafikiassumani-msft rafikiassumani-msft added triage-focus Add this label to flag the issue for focus at triage Priority:0 Work that we can't release without labels Jan 11, 2022
@mholec
Copy link

mholec commented May 31, 2022

I am still surprised why so much effort is put into generating documentation for the OAS. Considering the popularity of approaches like microservices and API gateways, generating documentation generally misses the point. Generated documentation never reaches the quality of the specification and reflects implementation errors. Generated documentation is unusable in practice for automation, mocking and testing. The specification first approach has been a trend for several years. How can Minimal APIs be minimalistic when half of the extension methods are used for swashbuckle instructions? In my opinion, a developer should program functionality, not instructions to generate documentation.

@captainsafia
Copy link
Member

I am still surprised why so much effort is put into generating documentation for the OAS. Considering the popularity of approaches like microservices and API gateways, generating documentation generally misses the point. Generated documentation never reaches the quality of the specification and reflects implementation errors. Generated documentation is unusable in practice for automation, mocking and testing. The specification first approach has been a trend for several years. How can Minimal APIs be minimalistic when half of the extension methods are used for swashbuckle instructions? In my opinion, a developer should program functionality, not instructions to generate documentation.

Although not outlined in this issue, our future direction rests on using a singular WithOpenApi extension method for modifying OpenApi-related details. We recognize that the plethora of extensions was problematic and switched to this design approach.

We've also got issues tracked here to generate more of the documentation by default. The extension methods are only there for explicitly overriding generated annotations.

@ghost
Copy link

ghost commented Oct 11, 2022

Thanks for contacting us.

We're moving this issue to the .NET 8 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@captainsafia
Copy link
Member

@rafikiassumani-msft What are your thoughts on closing this and creating a new epic for for .NET 8?

@ghost ghost locked as resolved and limited conversation to collaborators Dec 1, 2022
@amcasey amcasey added the area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc label Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc area-web-frameworks *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels Epic Groups multiple user stories. Can be grouped under a theme. feature-minimal-actions Controller-like actions for endpoint routing feature-openapi Priority:0 Work that we can't release without triage-focus Add this label to flag the issue for focus at triage
Projects
None yet
Development

No branches or pull requests

5 participants