From ae9d8a86f6126eb0bc43550b141977f01ede59bc Mon Sep 17 00:00:00 2001 From: tadelesh Date: Mon, 4 Jul 2022 10:45:42 +0800 Subject: [PATCH] add x-ms-enum for enum param --- .../stable/2021-03-01/Provider.json | 95 ++++++++----------- 1 file changed, 39 insertions(+), 56 deletions(-) diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/Provider.json b/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/Provider.json index 091671609146..81f084e385a7 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/Provider.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/Provider.json @@ -25,16 +25,7 @@ "operationId": "Provider_GetAvailableStacks", "parameters": [ { - "name": "osTypeSelected", - "in": "query", - "type": "string", - "enum": [ - "Windows", - "Linux", - "WindowsFunctions", - "LinuxFunctions", - "All" - ] + "$ref": "#/parameters/osTypeSelectedParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -69,15 +60,7 @@ "operationId": "Provider_GetFunctionAppStacks", "parameters": [ { - "name": "stackOsType", - "in": "query", - "description": "Stack OS Type", - "type": "string", - "enum": [ - "Windows", - "Linux", - "All" - ] + "$ref": "#/parameters/stackOsTypeParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -124,15 +107,7 @@ "type": "string" }, { - "name": "stackOsType", - "in": "query", - "description": "Stack OS Type", - "type": "string", - "enum": [ - "Windows", - "Linux", - "All" - ] + "$ref": "#/parameters/stackOsTypeParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -179,15 +154,7 @@ "type": "string" }, { - "name": "stackOsType", - "in": "query", - "description": "Stack OS Type", - "type": "string", - "enum": [ - "Windows", - "Linux", - "All" - ] + "$ref": "#/parameters/stackOsTypeParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -264,15 +231,7 @@ "operationId": "Provider_GetWebAppStacks", "parameters": [ { - "name": "stackOsType", - "in": "query", - "description": "Stack OS Type", - "type": "string", - "enum": [ - "Windows", - "Linux", - "All" - ] + "$ref": "#/parameters/stackOsTypeParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -312,16 +271,7 @@ "operationId": "Provider_GetAvailableStacksOnPrem", "parameters": [ { - "name": "osTypeSelected", - "in": "query", - "type": "string", - "enum": [ - "Windows", - "Linux", - "WindowsFunctions", - "LinuxFunctions", - "All" - ] + "$ref": "#/parameters/osTypeSelectedParameter" }, { "$ref": "#/parameters/subscriptionIdParameter" @@ -1118,6 +1068,39 @@ "description": "API Version", "required": true, "type": "string" + }, + "osTypeSelectedParameter": { + "name": "osTypeSelected", + "in": "query", + "type": "string", + "enum": [ + "Windows", + "Linux", + "WindowsFunctions", + "LinuxFunctions", + "All" + ], + "x-ms-enum": { + "name": "ProviderOsTypeSelected", + "modelAsString": true + }, + "x-ms-parameter-location": "method" + }, + "stackOsTypeParameter": { + "name": "stackOsType", + "in": "query", + "description": "Stack OS Type", + "type": "string", + "enum": [ + "Windows", + "Linux", + "All" + ], + "x-ms-enum": { + "name": "ProviderStackOsType", + "modelAsString": true + }, + "x-ms-parameter-location": "method" } }, "securityDefinitions": {