-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Open
Labels
area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesfeature-openapi
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
There are some cases where the framework / middleware pipeline can generate error responses, such as when the endpoint defines a required parameter -- if the parameter is not present in the request, the framework generates a status code 400 response. And if the ProblemDetails service was added to the DI container, it is used to generate a ProblemDetails response body for this.
However, these responses are not represented in the generated OpenAPI document.
Describe the solution you'd like
For the case indicated, and perhaps others, these responses should be included in the generated OpenAPI document. However, I think we'll want to be careful about this -- for example I'm not sure we should add 401 and 403 responses for operations that require authentication.
Additional context
No response
sander1095, marcominerva, totti240282, nicolaparo, pampua84 and 8 more
Metadata
Metadata
Assignees
Labels
area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesfeature-openapi