Skip to content

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

@sander1095

Description

@sander1095

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.

I am currently working on #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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions