Skip to content

Commit 39a80e4

Browse files
LingyunSujosuh
authored andcommitted
Azs api bug fix (Azure#12133)
* 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
1 parent d0b44f7 commit 39a80e4

File tree

4 files changed

+282
-1
lines changed

4 files changed

+282
-1
lines changed
Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"description": "Compute operation results.",
5+
"title": "FabricAdminClient",
6+
"version": "2020-10-01"
7+
},
8+
"host": "management.azure.com",
9+
"schemes": [
10+
"https"
11+
],
12+
"consumes": [
13+
"application/json"
14+
],
15+
"produces": [
16+
"application/json"
17+
],
18+
"paths": {
19+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric.Admin/fabricLocations/{location}/computeOperationResults/{operation}": {
20+
"get": {
21+
"x-ms-examples": {
22+
"Returns the status of the operation.": {
23+
"$ref": "./examples/ComputeOperationResult/Get.json"
24+
}
25+
},
26+
"tags": [
27+
"ComputeOperationResults"
28+
],
29+
"description": "Returns the status of a compute operation.",
30+
"operationId": "ComputeOperationResults_Get",
31+
"parameters": [
32+
{
33+
"$ref": "../2016-05-01/Fabric.json#/parameters/SubscriptionIdParameter"
34+
},
35+
{
36+
"$ref": "../2016-05-01/Fabric.json#/parameters/ResourceGroupParameter"
37+
},
38+
{
39+
"$ref": "../2016-05-01/Fabric.json#/parameters/LocationParameter"
40+
},
41+
{
42+
"$ref": "#/parameters/OperationParameter"
43+
},
44+
{
45+
"$ref": "#/parameters/ApiVersionParameter"
46+
}
47+
],
48+
"responses": {
49+
"200": {
50+
"description": "OK",
51+
"schema": {
52+
"$ref": "#/definitions/ComputeOperationResult"
53+
}
54+
},
55+
"default": {
56+
"description": "Default Response.",
57+
"schema": {
58+
"$ref": "#/definitions/ExtendedErrorInfo"
59+
}
60+
}
61+
}
62+
}
63+
},
64+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric.Admin/fabricLocations/{location}/computeOperationResults": {
65+
"get": {
66+
"x-ms-examples": {
67+
"Returns a list of all compute operation results at a location.": {
68+
"$ref": "./examples/ComputeOperationResult/List.json"
69+
}
70+
},
71+
"tags": [
72+
"ComputeOperationResults"
73+
],
74+
"description": "Returns a list of all compute operation results at a location.",
75+
"operationId": "ComputeOperationResults_List",
76+
"parameters": [
77+
{
78+
"$ref": "../2016-05-01/Fabric.json#/parameters/SubscriptionIdParameter"
79+
},
80+
{
81+
"$ref": "../2016-05-01/Fabric.json#/parameters/ResourceGroupParameter"
82+
},
83+
{
84+
"$ref": "../2016-05-01/Fabric.json#/parameters/LocationParameter"
85+
},
86+
{
87+
"$ref": "#/parameters/ApiVersionParameter"
88+
},
89+
{
90+
"$ref": "../2016-05-01/Fabric.json#/parameters/FilterParameter"
91+
}
92+
],
93+
"responses": {
94+
"200": {
95+
"description": "OK",
96+
"schema": {
97+
"$ref": "#/definitions/ComputeOperationResultList"
98+
}
99+
},
100+
"default": {
101+
"description": "Default Response.",
102+
"schema": {
103+
"$ref": "#/definitions/ExtendedErrorInfo"
104+
}
105+
}
106+
},
107+
"x-ms-pageable": {
108+
"nextLinkName": "nextLink"
109+
},
110+
"x-ms-odata": "#/definitions/ComputeOperationResult"
111+
}
112+
}
113+
},
114+
"definitions": {
115+
"ComputeOperationResult": {
116+
"description": "Compute operation result description.",
117+
"type": "object",
118+
"properties": {
119+
"properties": {
120+
"description": "Compute operation result properties.",
121+
"x-ms-client-flatten": true,
122+
"$ref": "#/definitions/ComputeOperationResultModel"
123+
}
124+
},
125+
"allOf": [
126+
{
127+
"$ref": "../2016-05-01/Fabric.json#/definitions/Resource"
128+
}
129+
]
130+
},
131+
"ComputeOperationResultModel": {
132+
"description": "Compute operation result properties.",
133+
"type": "object",
134+
"properties": {
135+
"instances": {
136+
"description": "List of operation result instances.",
137+
"type": "array",
138+
"items": {
139+
"type": "string"
140+
}
141+
},
142+
"provisioningState": {
143+
"description": "Success or failure of operation.",
144+
"type": "string"
145+
}
146+
}
147+
},
148+
"ComputeOperationResultList": {
149+
"description": "Pageable list of compute operation results.",
150+
"type": "object",
151+
"properties": {
152+
"value": {
153+
"description": "List of compute operation results.",
154+
"type": "array",
155+
"items": {
156+
"$ref": "#/definitions/ComputeOperationResult"
157+
}
158+
},
159+
"nextLink": {
160+
"description": "URI to the next page.",
161+
"type": "string"
162+
}
163+
}
164+
},
165+
"ExtendedErrorInfo": {
166+
"type": "object",
167+
"description": "Error response.",
168+
"properties": {
169+
"error": {
170+
"$ref": "#/definitions/ErrorDefinition",
171+
"description": "The error details."
172+
}
173+
}
174+
},
175+
"ErrorDefinition": {
176+
"type": "object",
177+
"description": "Error definition.",
178+
"properties": {
179+
"code": {
180+
"description": "Service specific error code which serves as the substatus for the HTTP error code.",
181+
"type": "string",
182+
"readOnly": true
183+
},
184+
"message": {
185+
"description": "Description of the error.",
186+
"type": "string",
187+
"readOnly": true
188+
},
189+
"details": {
190+
"description": "Internal error details.",
191+
"type": "array",
192+
"items": {
193+
"$ref": "#/definitions/ErrorDefinition"
194+
},
195+
"readOnly": true
196+
}
197+
}
198+
}
199+
},
200+
"parameters": {
201+
"ApiVersionParameter": {
202+
"name": "api-version",
203+
"in": "query",
204+
"description": "Client API Version.",
205+
"required": true,
206+
"type": "string",
207+
"default": "2020-10-01"
208+
},
209+
"OperationParameter": {
210+
"name": "operation",
211+
"description": "Operation identifier.",
212+
"in": "path",
213+
"required": true,
214+
"type": "string",
215+
"x-ms-parameter-location": "method"
216+
}
217+
},
218+
"securityDefinitions": {
219+
"azure_auth": {
220+
"type": "oauth2",
221+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
222+
"flow": "implicit",
223+
"description": "Authorization uses an Azure Active Directory OAuth2 flow.",
224+
"scopes": {
225+
"user_impersonation": "impersonate your user account"
226+
}
227+
}
228+
},
229+
"security": [
230+
{
231+
"azure_auth": [
232+
"user_impersonation"
233+
]
234+
}
235+
]
236+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"parameters": {
3+
"api-version": "2020-10-01",
4+
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
5+
"resourceGroupName": "System.local",
6+
"location": "local",
7+
"operation": "7129ebd4-efb5-4faf-89a5-9b9071811610"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"properties": {
13+
"provisioningState": "Succeeded"
14+
}
15+
}
16+
}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"parameters": {
3+
"api-version": "2020-10-01",
4+
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
5+
"resourceGroupName": "System.local",
6+
"location": "local"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"value": [
12+
{
13+
"properties": {
14+
"provisioningState": "Succeeded"
15+
}
16+
},
17+
{
18+
"properties": {
19+
"provisioningState": "Failed"
20+
}
21+
}
22+
]
23+
}
24+
}
25+
}
26+
}

specification/azsadmin/resource-manager/fabric/readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ These settings apply only when `--tag=package-2019-05-01` is specified on the co
9494
``` yaml $(tag) == 'package-2019-05-01'
9595
input-file:
9696
- "Microsoft.Fabric.Admin/preview/2016-05-01/ApplicationOperationResults.json"
97-
- "Microsoft.Fabric.Admin/preview/2016-05-01/ComputeOperationResults.json"
9897
- "Microsoft.Fabric.Admin/preview/2016-05-01/Fabric.json"
9998
- "Microsoft.Fabric.Admin/preview/2016-05-01/EdgeGateway.json"
10099
- "Microsoft.Fabric.Admin/preview/2016-05-01/EdgeGatewayPool.json"
@@ -113,6 +112,7 @@ input-file:
113112
- "Microsoft.Fabric.Admin/preview/2019-05-01/Drive.json"
114113
- "Microsoft.Fabric.Admin/preview/2019-05-01/Volume.json"
115114
- "Microsoft.Fabric.Admin/preview/2019-05-01/NasCluster.json"
115+
- "Microsoft.Fabric.Admin/preview/2020-10-01/ComputeOperationResults.json"
116116
- "Microsoft.Fabric.Admin/preview/2020-10-01/ScaleUnit.json"
117117
- "Microsoft.Fabric.Admin/preview/2020-10-01/ScaleUnitNode.json"
118118
```
@@ -189,6 +189,7 @@ input-file:
189189
- $(this-folder)/Microsoft.Fabric.Admin/preview/2019-05-01/NasCluster.json
190190
- $(this-folder)/Microsoft.Fabric.Admin/preview/2020-10-01/ScaleUnit.json
191191
- $(this-folder)/Microsoft.Fabric.Admin/preview/2020-10-01/ScaleUnitNode.json
192+
- $(this-folder)/Microsoft.Fabric.Admin/preview/2020-10-01/ComputeOperationResults.json
192193
193194
```
194195

0 commit comments

Comments
 (0)