aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

Allow OpenAPI's response descriptions to be set using Minimal API

Open sander1095 opened this issue 1 year ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

I am currently working on https://github.com/dotnet/aspnetcore/issues/55656 to add better OpenAPI description support to API responses using [ProducesResponseType] and other related attributes with MVC (Controllers).

As you can see in the comments, that issue excludes Minimal API support. Quoting @captainsafia :

That part of the API proposal was rejected because it would've been difficult to update the existing Produces extension methods in a way that is source compatible. The only API that was approved is the new Description property on the interfaces and concrete implementations.

Describe the solution you'd like

This feature request extends Minimal API's OpenAPI's Produces.. and other methods to accept a new optional, null-by-default description parameter.

Additional context

No response

sander1095 avatar Sep 19 '24 14:09 sander1095