Skip to content

[Route Groups] WithTags et al. should target IEndpointConventionBuilder #41428

Closed
@halter73

Description

@halter73

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).

Metadata

Metadata

Assignees

Labels

api-approvedAPI was approved in API review, it can be implementedarea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-minimal-actionsController-like actions for endpoint routingold-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions