Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 67af7a8

Browse files
authored
Update APITemplateCreator.cs to pickup correct displayName and keeping backward compatibility when displayName is not provided in config (#421)
1 parent dce94f6 commit 67af7a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/APIM_ARMTemplate/apimtemplate/Creator/TemplateCreators/APITemplateCreator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public async Task<APITemplateResource> CreateAPITemplateResourceAsync(APIConfig
136136
apiTemplateResource.properties.subscriptionKeyParameterNames = api.subscriptionKeyParameterNames;
137137
apiTemplateResource.properties.path = api.suffix;
138138
apiTemplateResource.properties.isCurrent = api.isCurrent;
139-
apiTemplateResource.properties.displayName = api.name;
139+
apiTemplateResource.properties.displayName = string.IsNullOrEmpty(api.displayName) ? api.name : api.displayName;
140140
apiTemplateResource.properties.protocols = this.CreateProtocols(api);
141141
// set the version set id
142142
if (api.apiVersionSetId != null)

0 commit comments

Comments
 (0)