@@ -28,9 +28,6 @@ public Template CreateProductTemplate(CreatorConfig creatorConfig)
28
28
List < TemplateResource > resources = new List < TemplateResource > ( ) ;
29
29
foreach ( ProductConfig product in creatorConfig . products )
30
30
{
31
- if ( string . IsNullOrEmpty ( product . name ) )
32
- product . name = product . displayName ;
33
-
34
31
// create product resource with properties
35
32
ProductsTemplateResource productsTemplateResource = new ProductsTemplateResource ( )
36
33
{
@@ -54,15 +51,15 @@ public Template CreateProductTemplate(CreatorConfig creatorConfig)
54
51
// create product policy resource that depends on the product, if provided
55
52
if ( product . policy != null )
56
53
{
57
- string [ ] dependsOn = new string [ ] { $ "[resourceId('Microsoft.ApiManagement/service/products', parameters('{ ParameterNames . ApimServiceName } '), '{ product . displayName } ')]" } ;
54
+ string [ ] dependsOn = new string [ ] { $ "[resourceId('Microsoft.ApiManagement/service/products', parameters('{ ParameterNames . ApimServiceName } '), '{ product . name } ')]" } ;
58
55
PolicyTemplateResource productPolicy = this . policyTemplateCreator . CreateProductPolicyTemplateResource ( product , dependsOn ) ;
59
56
resources . Add ( productPolicy ) ;
60
57
}
61
58
62
59
// create product group resources if provided
63
60
if ( product . groups != null )
64
61
{
65
- string [ ] dependsOn = new string [ ] { $ "[resourceId('Microsoft.ApiManagement/service/products', parameters('{ ParameterNames . ApimServiceName } '), '{ product . displayName } ')]" } ;
62
+ string [ ] dependsOn = new string [ ] { $ "[resourceId('Microsoft.ApiManagement/service/products', parameters('{ ParameterNames . ApimServiceName } '), '{ product . name } ')]" } ;
66
63
List < ProductGroupsValue > productGroups = this . productGroupTemplateCreator . CreateProductGroupTemplateResources ( product , dependsOn ) ;
67
64
resources . AddRange ( productGroups ) ;
68
65
}
0 commit comments