Closed
Description
WithTags
and other OpenApiRouteHandlerBuilderExtensions
don't work with route groups today because they target a custom IEndpointConventionBuilder
type (RouteHandlerBuilder
) rather than any IEndpointConventionBuilder
. While we do plan to support custom convention builder types on route groups (#41427), it shouldn't be necessary for many of the methods on OpenApiRouteHandlerBuilderExtensions
.
var group = app.MapGroup("/todos");
group.WithTags("tag"); // This doesn't compile
group.WithDescription("description"); // ditto
group.WithSummary("summary"); // ditto
Describe the solution you'd like
We should retarget WithTags
and similar methods to IEndpointConventionBuilder
. If we cannot do that without breaking, maybe it should target GroupRouteBuilder
(or a future IRouteGroup
interface).