Clarify meaning of the group name specified in WithGroupName by mikekistler · Pull Request #59784 · dotnet/aspnetcore (original) (raw)

Yeah, I think this doc comment is attempting to apply a literal description of what this method is doing. It instantiates the EndpointGroupNameAttribute class and adds it to the metadata collection.

However, that's a means to an end for the real valuable thing which is the fact that EndpointGroupNameAttribute implements the IEndpointGroupNameMetadata interface. That's what's actually relevant here so I think your recommendation of referencing the interface instead of the class is a good one.