Skip to content

Commit 72ed2cf

Browse files
Chris Martinezcommonsensesoftware
authored andcommitted
Preserve API group name when explicitly set
1 parent 20d98d3 commit 72ed2cf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer/VersionedApiDescriptionProvider.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,11 @@ public virtual void OnProvidersExecuted( ApiDescriptionProviderContext context )
108108

109109
var groupResult = result.Clone();
110110

111-
groupResult.GroupName = groupName;
111+
if ( string.IsNullOrEmpty( groupResult.GroupName ) )
112+
{
113+
groupResult.GroupName = groupName;
114+
}
115+
112116
groupResult.SetApiVersion( version );
113117
PopulateApiVersionParameters( groupResult, version );
114118
groupResult.TryUpdateRelativePathAndRemoveApiVersionParameter( Options );

0 commit comments

Comments
 (0)