Allow setting a group name for endpoints and have it be used to populate ApiDescription.GroupName in ApiExplorer for minimal APIs #34541
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
area-web-frameworks
*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
feature-minimal-actions
Controller-like actions for endpoint routing
Priority:1
Work that is critical for the release, but we could probably ship without
Milestone
APIs described by
Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription
can optionally have a group name defined by theGroupName
property. Today in the framework there isn't a way provided to set the group name for an endpoint via its metadata and theEndpointMetadataApiDescriptionProvider
does not setApiDescription.GroupName
when it populatesApiExplorer
with details of the registered endpoints.ApiDescription.GroupName
is used by frameworks like Swashbuckle to associate APIs with different OpenAPI documents, i.e. if the document name and API group name match the API is included in the document (see default logic here).We should allow for setting the group name for endpoints via their metadata and have that used to populate the
ApiDescription.GroupName
property when the endpoints are added toApiExplorer
.Proposed types for addition:
Proposed extension methods for addition:
Example of these new types and methods being used with minimal APIs:
The text was updated successfully, but these errors were encountered: