Skip to content

Commit 6eff9d2

Browse files
authored
Set DisplayName using endpoint name
1 parent c5fa42f commit 6eff9d2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Http/Routing/src/Builder/MinimalActionEndpointRouteBuilderExtensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,13 @@ public static MinimalActionEndpointConventionBuilder Map(
195195
{
196196
builder.Metadata.Add(new EndpointNameMetadata(endpointName));
197197
builder.Metadata.Add(new RouteNameMetadata(endpointName));
198+
builder.DisplayName = $"{pattern} => {endpointName}";
198199
}
199200
else
200201
{
201202
builder.Metadata.Add(new EndpointNameMetadata(action.Method.Name));
202203
builder.Metadata.Add(new RouteNameMetadata(action.Method.Name));
204+
builder.DisplayName = $"{pattern} => {endpointName}";
203205
}
204206
}
205207

0 commit comments

Comments
 (0)