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

Commit eca300e

Browse files
jjinxnRupengLiu
andauthored
Fixed adding apiVersionSetId to initial template (#362)
Co-authored-by: RupengLiu <rliu1211@terpmail.umd.edu>
1 parent 0a4b5dc commit eca300e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,12 @@ public async Task<APITemplateResource> CreateAPITemplateResourceAsync(APIConfig
199199
// open api spec is local yaml file
200200
format = "openapi";
201201
}
202+
}
203+
// set the version set id
204+
if (api.apiVersionSetId != null)
205+
{
206+
// point to the supplied version set if the apiVersionSetId is provided
207+
apiTemplateResource.properties.apiVersionSetId = $"[resourceId('Microsoft.ApiManagement/service/apiVersionSets', parameters('{ParameterNames.ApimServiceName}'), '{api.apiVersionSetId}')]";
202208
}
203209
apiTemplateResource.properties.format = format;
204210
apiTemplateResource.properties.value = value;

0 commit comments

Comments
 (0)