From 6b8fa3acc037b63f0e95e4e6436394faa85d8829 Mon Sep 17 00:00:00 2001 From: Lingyun Su Date: Tue, 15 Dec 2020 15:18:28 -0800 Subject: [PATCH 1/5] Old api version for ComputeOperationResult --- .../2020-10-01/ComputeOperationResults.json | 185 ++++++++++++++++++ .../examples/ComputeOperationResult/Get.json | 19 ++ .../examples/ComputeOperationResult/List.json | 26 +++ 3 files changed, 230 insertions(+) create mode 100644 specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/ComputeOperationResults.json create mode 100644 specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/Get.json create mode 100644 specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/List.json diff --git a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/ComputeOperationResults.json b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/ComputeOperationResults.json new file mode 100644 index 000000000000..6105e4ac42d7 --- /dev/null +++ b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/ComputeOperationResults.json @@ -0,0 +1,185 @@ +{ + "swagger": "2.0", + "info": { + "description": "Compute operation results.", + "title": "FabricAdminClient", + "version": "2016-05-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric.Admin/fabricLocations/{location}/computeOperationResults/{operation}": { + "get": { + "x-ms-examples": { + "Returns the status of the operation.": { + "$ref": "./examples/ComputeOperationResult/Get.json" + } + }, + "tags": [ + "ComputeOperationResults" + ], + "description": "Returns the status of a compute operation.", + "operationId": "ComputeOperationResults_Get", + "parameters": [ + { + "$ref": "Fabric.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "Fabric.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "Fabric.json#/parameters/LocationParameter" + }, + { + "$ref": "#/parameters/OperationParameter" + }, + { + "$ref": "Fabric.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ComputeOperationResult" + } + }, + "404": { + "description": "NOT FOUND" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric.Admin/fabricLocations/{location}/computeOperationResults": { + "get": { + "x-ms-examples": { + "Returns a list of all compute operation results at a location.": { + "$ref": "./examples/ComputeOperationResult/List.json" + } + }, + "tags": [ + "ComputeOperationResults" + ], + "description": "Returns a list of all compute operation results at a location.", + "operationId": "ComputeOperationResults_List", + "parameters": [ + { + "$ref": "Fabric.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "Fabric.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "Fabric.json#/parameters/LocationParameter" + }, + { + "$ref": "Fabric.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "Fabric.json#/parameters/FilterParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ComputeOperationResultList" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/ComputeOperationResult" + } + } + }, + "definitions": { + "ComputeOperationResult": { + "description": "Compute operation result description.", + "type": "object", + "properties": { + "properties": { + "description": "Compute operation result properties.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/ComputeOperationResultModel" + } + }, + "allOf": [ + { + "$ref": "Fabric.json#/definitions/Resource" + } + ] + }, + "ComputeOperationResultModel": { + "description": "Compute operation result properties.", + "type": "object", + "properties": { + "instances": { + "description": "List of operation result instances.", + "type": "array", + "items": { + "type": "string" + } + }, + "provisioningState": { + "description": "Success or failure of operation.", + "type": "string" + } + } + }, + "ComputeOperationResultList": { + "description": "Pageable list of compute operation results.", + "type": "object", + "properties": { + "value": { + "description": "List of compute operation results.", + "type": "array", + "items": { + "$ref": "#/definitions/ComputeOperationResult" + } + }, + "nextLink": { + "description": "URI to the next page.", + "type": "string" + } + } + } + }, + "parameters": { + "OperationParameter": { + "name": "operation", + "description": "Operation identifier.", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Authorization uses an Azure Active Directory OAuth2 flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ] +} diff --git a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/Get.json b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/Get.json new file mode 100644 index 000000000000..c8588d8d957c --- /dev/null +++ b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/Get.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2016-05-01", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "System.local", + "location": "local", + "operation": "7129ebd4-efb5-4faf-89a5-9b9071811610" + }, + "responses": { + "200": { + "body": { + "properties": { + "provisioningState": "Succeeded" + } + } + }, + "404": {} + } +} diff --git a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/List.json b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/List.json new file mode 100644 index 000000000000..99f6e0f7c7b1 --- /dev/null +++ b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/List.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2016-05-01", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "System.local", + "location": "local" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "provisioningState": "Succeeded" + } + }, + { + "properties": { + "provisioningState": "Failed" + } + } + ] + } + } + } +} From b1560e947a1c5a0db71c188ebb3feee8055f7d36 Mon Sep 17 00:00:00 2001 From: Lingyun Su Date: Tue, 15 Dec 2020 15:25:20 -0800 Subject: [PATCH 2/5] Api Bugfix for Azure Stack Fabric Admin --- .../2020-10-01/ComputeOperationResults.json | 30 ++++++++++++------- .../examples/ComputeOperationResult/Get.json | 2 +- .../examples/ComputeOperationResult/List.json | 2 +- .../resource-manager/fabric/readme.md | 3 +- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/ComputeOperationResults.json b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/ComputeOperationResults.json index 6105e4ac42d7..4f469fa53387 100644 --- a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/ComputeOperationResults.json +++ b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/ComputeOperationResults.json @@ -3,7 +3,7 @@ "info": { "description": "Compute operation results.", "title": "FabricAdminClient", - "version": "2016-05-01" + "version": "2020-10-01" }, "host": "management.azure.com", "schemes": [ @@ -30,19 +30,19 @@ "operationId": "ComputeOperationResults_Get", "parameters": [ { - "$ref": "Fabric.json#/parameters/SubscriptionIdParameter" + "$ref": "../2016-05-01/Fabric.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "Fabric.json#/parameters/ResourceGroupParameter" + "$ref": "../2016-05-01/Fabric.json#/parameters/ResourceGroupParameter" }, { - "$ref": "Fabric.json#/parameters/LocationParameter" + "$ref": "../2016-05-01/Fabric.json#/parameters/LocationParameter" }, { "$ref": "#/parameters/OperationParameter" }, { - "$ref": "Fabric.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { @@ -72,19 +72,19 @@ "operationId": "ComputeOperationResults_List", "parameters": [ { - "$ref": "Fabric.json#/parameters/SubscriptionIdParameter" + "$ref": "../2016-05-01/Fabric.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "Fabric.json#/parameters/ResourceGroupParameter" + "$ref": "../2016-05-01/Fabric.json#/parameters/ResourceGroupParameter" }, { - "$ref": "Fabric.json#/parameters/LocationParameter" + "$ref": "../2016-05-01/Fabric.json#/parameters/LocationParameter" }, { - "$ref": "Fabric.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/ApiVersionParameter" }, { - "$ref": "Fabric.json#/parameters/FilterParameter" + "$ref": "../2016-05-01/Fabric.json#/parameters/FilterParameter" } ], "responses": { @@ -115,7 +115,7 @@ }, "allOf": [ { - "$ref": "Fabric.json#/definitions/Resource" + "$ref": "../2016-05-01/Fabric.json#/definitions/Resource" } ] }, @@ -155,6 +155,14 @@ } }, "parameters": { + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "Client API Version.", + "required": true, + "type": "string", + "default": "2020-10-01" + }, "OperationParameter": { "name": "operation", "description": "Operation identifier.", diff --git a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/Get.json b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/Get.json index c8588d8d957c..95c3236817ed 100644 --- a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/Get.json +++ b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/Get.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2016-05-01", + "api-version": "2020-10-01", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "resourceGroupName": "System.local", "location": "local", diff --git a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/List.json b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/List.json index 99f6e0f7c7b1..a2aa41368b33 100644 --- a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/List.json +++ b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/List.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2016-05-01", + "api-version": "2020-10-01", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "resourceGroupName": "System.local", "location": "local" diff --git a/specification/azsadmin/resource-manager/fabric/readme.md b/specification/azsadmin/resource-manager/fabric/readme.md index 238e9584cb6d..70cb2498427d 100644 --- a/specification/azsadmin/resource-manager/fabric/readme.md +++ b/specification/azsadmin/resource-manager/fabric/readme.md @@ -94,7 +94,6 @@ These settings apply only when `--tag=package-2019-05-01` is specified on the co ``` yaml $(tag) == 'package-2019-05-01' input-file: - "Microsoft.Fabric.Admin/preview/2016-05-01/ApplicationOperationResults.json" - - "Microsoft.Fabric.Admin/preview/2016-05-01/ComputeOperationResults.json" - "Microsoft.Fabric.Admin/preview/2016-05-01/Fabric.json" - "Microsoft.Fabric.Admin/preview/2016-05-01/EdgeGateway.json" - "Microsoft.Fabric.Admin/preview/2016-05-01/EdgeGatewayPool.json" @@ -113,6 +112,7 @@ input-file: - "Microsoft.Fabric.Admin/preview/2019-05-01/Drive.json" - "Microsoft.Fabric.Admin/preview/2019-05-01/Volume.json" - "Microsoft.Fabric.Admin/preview/2019-05-01/NasCluster.json" + - "Microsoft.Fabric.Admin/preview/2020-10-01/ComputeOperationResults.json" - "Microsoft.Fabric.Admin/preview/2020-10-01/ScaleUnit.json" - "Microsoft.Fabric.Admin/preview/2020-10-01/ScaleUnitNode.json" ``` @@ -189,6 +189,7 @@ input-file: - $(this-folder)/Microsoft.Fabric.Admin/preview/2019-05-01/NasCluster.json - $(this-folder)/Microsoft.Fabric.Admin/preview/2020-10-01/ScaleUnit.json - $(this-folder)/Microsoft.Fabric.Admin/preview/2020-10-01/ScaleUnitNode.json + - $(this-folder)/Microsoft.Fabric.Admin/preview/2020-10-01/ComputeOperationResults.json" ``` From 67b063f3f5036015711cf2187ab6501e2c601290 Mon Sep 17 00:00:00 2001 From: Lingyun Su Date: Tue, 15 Dec 2020 16:08:56 -0800 Subject: [PATCH 3/5] Fix for typo in readme --- specification/azsadmin/resource-manager/fabric/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/azsadmin/resource-manager/fabric/readme.md b/specification/azsadmin/resource-manager/fabric/readme.md index 70cb2498427d..aaa749370e15 100644 --- a/specification/azsadmin/resource-manager/fabric/readme.md +++ b/specification/azsadmin/resource-manager/fabric/readme.md @@ -189,7 +189,7 @@ input-file: - $(this-folder)/Microsoft.Fabric.Admin/preview/2019-05-01/NasCluster.json - $(this-folder)/Microsoft.Fabric.Admin/preview/2020-10-01/ScaleUnit.json - $(this-folder)/Microsoft.Fabric.Admin/preview/2020-10-01/ScaleUnitNode.json - - $(this-folder)/Microsoft.Fabric.Admin/preview/2020-10-01/ComputeOperationResults.json" + - $(this-folder)/Microsoft.Fabric.Admin/preview/2020-10-01/ComputeOperationResults.json ``` From 6bca702ed17f92ce7295055bd70c6aa80f107676 Mon Sep 17 00:00:00 2001 From: Lingyun Su Date: Mon, 4 Jan 2021 15:53:20 -0800 Subject: [PATCH 4/5] Add default reponse --- .../2020-10-01/ComputeOperationResults.json | 47 ++++++++++++++++++- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/ComputeOperationResults.json b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/ComputeOperationResults.json index 4f469fa53387..dae0dcd3ece8 100644 --- a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/ComputeOperationResults.json +++ b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/ComputeOperationResults.json @@ -52,8 +52,11 @@ "$ref": "#/definitions/ComputeOperationResult" } }, - "404": { - "description": "NOT FOUND" + "default": { + "description": "Default Response.", + "schema": { + "$ref": "#/definitions/ExtendedErrorInfo" + } } } } @@ -93,6 +96,12 @@ "schema": { "$ref": "#/definitions/ComputeOperationResultList" } + }, + "default": { + "description": "Default Response.", + "schema": { + "$ref": "#/definitions/ExtendedErrorInfo" + } } }, "x-ms-pageable": { @@ -152,6 +161,40 @@ "type": "string" } } + }, + "ExtendedErrorInfo": { + "type": "object", + "description": "Error response.", + "properties": { + "error": { + "$ref": "#/definitions/ErrorDefinition", + "description": "The error details." + } + } + }, + "ErrorDefinition": { + "type": "object", + "description": "Error definition.", + "properties": { + "code": { + "description": "Service specific error code which serves as the substatus for the HTTP error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Description of the error.", + "type": "string", + "readOnly": true + }, + "details": { + "description": "Internal error details.", + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDefinition" + }, + "readOnly": true + } + } } }, "parameters": { From ec1d61e2795de5a6e67d08e4e8ae17a9c9ef9fbe Mon Sep 17 00:00:00 2001 From: Lingyun Su Date: Mon, 4 Jan 2021 16:00:35 -0800 Subject: [PATCH 5/5] Fix example issue for default error --- .../2020-10-01/examples/ComputeOperationResult/Get.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/Get.json b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/Get.json index 95c3236817ed..698f9044c913 100644 --- a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/Get.json +++ b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2020-10-01/examples/ComputeOperationResult/Get.json @@ -13,7 +13,6 @@ "provisioningState": "Succeeded" } } - }, - "404": {} + } } }