Skip to content

Commit

Permalink
Azs api bug fix (Azure#12133)
Browse files Browse the repository at this point in the history
* Old api version for ComputeOperationResult

* Api Bugfix for Azure Stack Fabric Admin

* Fix for typo in readme

* Add default reponse

* Fix example issue for default error
  • Loading branch information
LingyunSu authored and josuh committed Jan 6, 2021
1 parent d0b44f7 commit 39a80e4
Show file tree
Hide file tree
Showing 4 changed files with 282 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
{
"swagger": "2.0",
"info": {
"description": "Compute operation results.",
"title": "FabricAdminClient",
"version": "2020-10-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": "../2016-05-01/Fabric.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../2016-05-01/Fabric.json#/parameters/ResourceGroupParameter"
},
{
"$ref": "../2016-05-01/Fabric.json#/parameters/LocationParameter"
},
{
"$ref": "#/parameters/OperationParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ComputeOperationResult"
}
},
"default": {
"description": "Default Response.",
"schema": {
"$ref": "#/definitions/ExtendedErrorInfo"
}
}
}
}
},
"/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": "../2016-05-01/Fabric.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../2016-05-01/Fabric.json#/parameters/ResourceGroupParameter"
},
{
"$ref": "../2016-05-01/Fabric.json#/parameters/LocationParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "../2016-05-01/Fabric.json#/parameters/FilterParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ComputeOperationResultList"
}
},
"default": {
"description": "Default Response.",
"schema": {
"$ref": "#/definitions/ExtendedErrorInfo"
}
}
},
"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": "../2016-05-01/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"
}
}
},
"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": {
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
"description": "Client API Version.",
"required": true,
"type": "string",
"default": "2020-10-01"
},
"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"
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"parameters": {
"api-version": "2020-10-01",
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
"resourceGroupName": "System.local",
"location": "local",
"operation": "7129ebd4-efb5-4faf-89a5-9b9071811610"
},
"responses": {
"200": {
"body": {
"properties": {
"provisioningState": "Succeeded"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"parameters": {
"api-version": "2020-10-01",
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
"resourceGroupName": "System.local",
"location": "local"
},
"responses": {
"200": {
"body": {
"value": [
{
"properties": {
"provisioningState": "Succeeded"
}
},
{
"properties": {
"provisioningState": "Failed"
}
}
]
}
}
}
}
3 changes: 2 additions & 1 deletion specification/azsadmin/resource-manager/fabric/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
```
Expand Down Expand Up @@ -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
```

Expand Down

0 comments on commit 39a80e4

Please sign in to comment.