Open agilenut opened 2 years ago
I'm not sure if this feature request goes here or somewhere in dotnet but...
Can we have a Minimal API equivalent to ProducesDefaultResponseType? Something like:
app.MapGet("todos", TodoHandler.Handle) .Produces<Todo[]>() .ProducesDefault() .WithTags("Todos") .WithName("GetTodos");
which would result in the default swagger response being ProblemDetails, and
app.MapGet("todos", TodoHandler.Handle) .Produces<Todo[]>() .ProducesDefault<MyToDoErrors>() .WithTags("Todos") .WithName("GetTodos");
which would allow you to specify your own default response type.
This issue is stale because it has been open for 60 days with no activity. It will be automatically closed in 14 days if no further updates are made.
I'm not sure if this feature request goes here or somewhere in dotnet but...
Can we have a Minimal API equivalent to ProducesDefaultResponseType? Something like:
which would result in the default swagger response being ProblemDetails, and
which would allow you to specify your own default response type.