-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Open
Labels
Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.The author of this issue needs to respond in order for us to continue investigating this issue.Needs: ReproIndicates that the team needs a repro project to continue the investigation on this issueIndicates that the team needs a repro project to continue the investigation on this issuearea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-openapi
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.
As far as i can see there is no way to provide a description to a response type. The standard .Produce
methods don't have any parameter for it, and I've even tried this with no luck -
.WithOpenApi(operation =>
{
operation.Responses["200"].Description = "Downloadable HTML file containing all todos in a formatted table";
operation.Responses["204"].Description = "No todos available to export";
return operation;
})
and
.WithMetadata(new ProducesResponseTypeMetadata(StatusCodes.Status200OK, null, ["text/html"]) { Description = "Downloadable HTML file containing all todos in a formatted table" })
Describe the solution you'd like
An extra parameter added to the .Produces
method to add the description field
Additional context
Looks like currently internally it populates it with the response status code name. Ideally, we should be able to override it or append to it
Metadata
Metadata
Assignees
Labels
Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.The author of this issue needs to respond in order for us to continue investigating this issue.Needs: ReproIndicates that the team needs a repro project to continue the investigation on this issueIndicates that the team needs a repro project to continue the investigation on this issuearea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-openapi