From 7016add7344e09672b458e7a9bee4832f54597a8 Mon Sep 17 00:00:00 2001 From: Tim Lovell-Smith Date: Wed, 15 Mar 2023 22:26:14 -0700 Subject: [PATCH] Refactor cache swagger to deduplicate SkuName enum definitions. (#23049) --- .../2023-03-01-preview/redisenterprise.json | 50 ++++++++----------- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json b/specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json index c747d87030be..321640684831 100644 --- a/specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json +++ b/specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json @@ -1300,21 +1300,8 @@ "type": "object", "properties": { "name": { - "type": "string", - "description": "The type of RedisEnterprise cluster to deploy. Possible values: (Enterprise_E10, EnterpriseFlash_F300 etc.)", - "enum": [ - "Enterprise_E10", - "Enterprise_E20", - "Enterprise_E50", - "Enterprise_E100", - "EnterpriseFlash_F300", - "EnterpriseFlash_F700", - "EnterpriseFlash_F1500" - ], - "x-ms-enum": { - "name": "SkuName", - "modelAsString": true - } + "$ref": "#/definitions/SkuName", + "description": "The type of RedisEnterprise cluster to deploy. Possible values: (Enterprise_E10, EnterpriseFlash_F300 etc.)" }, "capacity": { "type": "integer", @@ -1938,24 +1925,27 @@ "description": "Information about Sku", "properties": { "name": { - "type": "string", - "description": "The type of RedisEnterprise cluster to deploy. Possible values: (Enterprise_E10, EnterpriseFlash_F300 etc.)", - "enum": [ - "Enterprise_E10", - "Enterprise_E20", - "Enterprise_E50", - "Enterprise_E100", - "EnterpriseFlash_F300", - "EnterpriseFlash_F700", - "EnterpriseFlash_F1500" - ], - "x-ms-enum": { - "name": "name", - "modelAsString": true - } + "$ref": "#/definitions/SkuName", + "description": "The type of RedisEnterprise cluster to deploy. Possible values: (Enterprise_E10, EnterpriseFlash_F300 etc.)" } } }, + "SkuName": { + "type": "string", + "enum": [ + "Enterprise_E10", + "Enterprise_E20", + "Enterprise_E50", + "Enterprise_E100", + "EnterpriseFlash_F300", + "EnterpriseFlash_F700", + "EnterpriseFlash_F1500" + ], + "x-ms-enum": { + "name": "SkuName", + "modelAsString": true + } + }, "Capability": { "type": "object", "title": "Capability",