dotnet / dotnet/aspnetcore

[Route Groups] Add default metadata to endpoints exposing group structure

Open
#41,429 17 comments 3 reactions 1 assignee Claimed by @halter73 View on GitHub
area-minimal
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

Currently the `MapGroup` API described in #36007 does not add any default metadata enabling endpoint to observe what groups they're in if any.

### Describe the solution you'd like

`MapGroup` should add default metadata. It's tempting to use `EndpointGroupNameAttribute` like `WithGroupName`, but this implications on the swagger.json produced by Swashbuckle and NSwag (see https://github.com/dotnet/aspnetcore/issues/36414), so we want to be careful here.

We also need to consider what the default group name should be (just the prefix?) and whether nested groups should add multiple pieced of metadata or if the nested group structure can be encapsulated in a single object.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.