Skip to content

Commit b186a5f

Browse files
authored
AzsAdmin Compute: Fixing powershell generation errors (#15059)
* Update to use unique resource names to avoid collisions; Add SubscriptionId to ScaleUnits route * Reverting use of common type apiversion to avoid breaking changes. * Moving ApiVersion back to use common type
1 parent c25e3a8 commit b186a5f

File tree

15 files changed

+235
-574
lines changed

15 files changed

+235
-574
lines changed

specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/preview/2015-12-01-preview/Compute.json

Lines changed: 67 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"operationId": "Operations_List",
3030
"parameters": [
3131
{
32-
"$ref": "#/parameters/ApiVersionParameter"
32+
"$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
3333
}
3434
],
3535
"responses": {
@@ -40,9 +40,9 @@
4040
}
4141
},
4242
"default": {
43-
"description": "Default Response.",
43+
"description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).",
4444
"schema": {
45-
"$ref": "#/definitions/ErrorDetails"
45+
"$ref": "Compute.json#/definitions/CrpErrorResponse"
4646
}
4747
}
4848
},
@@ -79,6 +79,32 @@
7979
},
8080
"x-ms-azure-resource": true
8181
},
82+
"CrpResource": {
83+
"description": "Base resource object.",
84+
"type": "object",
85+
"properties": {
86+
"id": {
87+
"readOnly": true,
88+
"description": "ID of the resource.",
89+
"type": "string"
90+
},
91+
"name": {
92+
"readOnly": true,
93+
"description": "Name of the resource.",
94+
"type": "string"
95+
},
96+
"type": {
97+
"readOnly": true,
98+
"description": "Type of Resource.",
99+
"type": "string"
100+
},
101+
"location": {
102+
"description": "Location of the resource.",
103+
"type": "string"
104+
}
105+
},
106+
"x-ms-azure-resource": true
107+
},
82108
"ProvisioningState": {
83109
"description": "The provisioning state of the resource.",
84110
"enum": [
@@ -94,6 +120,7 @@
94120
},
95121
"Operation": {
96122
"description": "Describes the supported REST operation.",
123+
"type": "object",
97124
"properties": {
98125
"name": {
99126
"description": "The name of the operation being performed on this particular object. This name should match the name that appears in RBAC or the event service.",
@@ -112,6 +139,7 @@
112139
},
113140
"Display": {
114141
"description": "Contains the localized display information for this particular operation or action.",
142+
"type": "object",
115143
"properties": {
116144
"provider": {
117145
"description": "The localized, friendly version of the resource provider name. The provider name is expected to include the name of the publisher or company responsible. The provider name format should use title case and begin with \"Microsoft\" for first-party services. For example, the provider name may be\"Microsoft Monitoring Insights\" or \"Microsoft Compute.\"",
@@ -133,6 +161,7 @@
133161
},
134162
"OperationList": {
135163
"description": "List of Operations",
164+
"type": "object",
136165
"properties": {
137166
"value": {
138167
"description": "Array of operations",
@@ -147,36 +176,53 @@
147176
}
148177
}
149178
},
150-
"ErrorDetails": {
151-
"description": "Error details.",
152-
"type": "object",
153-
"properties": {
154-
"error": {
155-
"description": "Object containing error details.",
156-
"$ref": "#/definitions/ErrorDetailsInternal"
157-
}
158-
}
159-
},
160-
"ErrorDetailsInternal": {
161-
"description": "Error details.",
179+
"ErrorDetail": {
180+
"description": "The error detail.",
162181
"type": "object",
163182
"properties": {
164183
"code": {
165-
"description": "The error code.",
184+
"readOnly": true,
166185
"type": "string",
167-
"readOnly": true
186+
"description": "The error code."
168187
},
169188
"message": {
170-
"description": "The error message.",
189+
"readOnly": true,
171190
"type": "string",
172-
"readOnly": true
191+
"description": "The error message."
173192
},
174193
"target": {
175-
"description": "The target of the particular error.",
194+
"readOnly": true,
176195
"type": "string",
177-
"readOnly": true
196+
"description": "The error target."
178197
}
179198
}
199+
},
200+
"CrpErrorResponse": {
201+
"title": "Error response",
202+
"description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).",
203+
"type": "object",
204+
"properties": {
205+
"error": {
206+
"description": "The error object.",
207+
"$ref": "#/definitions/ErrorDetail"
208+
}
209+
}
210+
},
211+
"ErrorAdditionalInfo": {
212+
"type": "object",
213+
"properties": {
214+
"type": {
215+
"readOnly": true,
216+
"type": "string",
217+
"description": "The additional info type."
218+
},
219+
"info": {
220+
"readOnly": true,
221+
"type": "object",
222+
"description": "The additional info."
223+
}
224+
},
225+
"description": "The resource management error additional info."
180226
}
181227
},
182228
"parameters": {
@@ -187,14 +233,6 @@
187233
"required": true,
188234
"type": "string"
189235
},
190-
"ApiVersionParameter": {
191-
"name": "api-version",
192-
"in": "query",
193-
"description": "Client API Version.",
194-
"required": true,
195-
"type": "string",
196-
"default": "2015-12-01-preview"
197-
},
198236
"LocationParameter": {
199237
"description": "Location of the resource.",
200238
"name": "location",

specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/preview/2015-12-01-preview/PlatformImages.json

Lines changed: 13 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"$ref": "Compute.json#/parameters/LocationParameter"
3737
},
3838
{
39-
"$ref": "Compute.json#/parameters/ApiVersionParameter"
39+
"$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
4040
}
4141
],
4242
"responses": {
@@ -47,9 +47,9 @@
4747
}
4848
},
4949
"default": {
50-
"description": "Default Response.",
50+
"description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).",
5151
"schema": {
52-
"$ref": "#/definitions/ErrorDetails"
52+
"$ref": "Compute.json#/definitions/CrpErrorResponse"
5353
}
5454
}
5555
}
@@ -88,7 +88,7 @@
8888
"$ref": "Compute.json#/parameters/VersionParameter"
8989
},
9090
{
91-
"$ref": "Compute.json#/parameters/ApiVersionParameter"
91+
"$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
9292
}
9393
],
9494
"responses": {
@@ -99,9 +99,9 @@
9999
}
100100
},
101101
"default": {
102-
"description": "Default Response.",
102+
"description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).",
103103
"schema": {
104-
"$ref": "#/definitions/ErrorDetails"
104+
"$ref": "Compute.json#/definitions/CrpErrorResponse"
105105
}
106106
}
107107
}
@@ -138,7 +138,7 @@
138138
"$ref": "Compute.json#/parameters/VersionParameter"
139139
},
140140
{
141-
"$ref": "Compute.json#/parameters/ApiVersionParameter"
141+
"$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
142142
},
143143
{
144144
"$ref": "#/parameters/NewPlatformImageParameter"
@@ -164,9 +164,9 @@
164164
}
165165
},
166166
"default": {
167-
"description": "Default Response.",
167+
"description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).",
168168
"schema": {
169-
"$ref": "#/definitions/ErrorDetails"
169+
"$ref": "Compute.json#/definitions/CrpErrorResponse"
170170
}
171171
}
172172
},
@@ -204,14 +204,14 @@
204204
"$ref": "Compute.json#/parameters/VersionParameter"
205205
},
206206
{
207-
"$ref": "Compute.json#/parameters/ApiVersionParameter"
207+
"$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
208208
}
209209
],
210210
"responses": {
211211
"default": {
212-
"description": "Default Response.",
212+
"description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).",
213213
"schema": {
214-
"$ref": "#/definitions/ErrorDetails"
214+
"$ref": "Compute.json#/definitions/CrpErrorResponse"
215215
}
216216
},
217217
"200": {
@@ -234,7 +234,7 @@
234234
},
235235
"allOf": [
236236
{
237-
"$ref": "Compute.json#/definitions/Resource"
237+
"$ref": "Compute.json#/definitions/CrpResource"
238238
}
239239
]
240240
},
@@ -331,37 +331,6 @@
331331
"$ref": "#/definitions/PlatformImageProperties"
332332
}
333333
}
334-
},
335-
"ErrorDetails": {
336-
"description": "Error details.",
337-
"type": "object",
338-
"properties": {
339-
"error": {
340-
"description": "Object containing error details.",
341-
"$ref": "#/definitions/ErrorDetailsInternal"
342-
}
343-
}
344-
},
345-
"ErrorDetailsInternal": {
346-
"description": "Error details.",
347-
"type": "object",
348-
"properties": {
349-
"code": {
350-
"description": "The error code.",
351-
"type": "string",
352-
"readOnly": true
353-
},
354-
"message": {
355-
"description": "The error message.",
356-
"type": "string",
357-
"readOnly": true
358-
},
359-
"target": {
360-
"description": "The target of the particular error.",
361-
"type": "string",
362-
"readOnly": true
363-
}
364-
}
365334
}
366335
},
367336
"parameters": {

specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/preview/2015-12-01-preview/Quotas.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"$ref": "#/parameters/QuotaParameter"
4040
},
4141
{
42-
"$ref": "Compute.json#/parameters/ApiVersionParameter"
42+
"$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
4343
}
4444
],
4545
"responses": {
@@ -80,7 +80,7 @@
8080
"$ref": "#/parameters/QuotaParameter"
8181
},
8282
{
83-
"$ref": "Compute.json#/parameters/ApiVersionParameter"
83+
"$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
8484
},
8585
{
8686
"$ref": "#/parameters/NewQuotaParameter"
@@ -124,7 +124,7 @@
124124
"$ref": "#/parameters/QuotaParameter"
125125
},
126126
{
127-
"$ref": "Compute.json#/parameters/ApiVersionParameter"
127+
"$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
128128
}
129129
],
130130
"responses": {
@@ -161,7 +161,7 @@
161161
"$ref": "Compute.json#/parameters/LocationParameter"
162162
},
163163
{
164-
"$ref": "Compute.json#/parameters/ApiVersionParameter"
164+
"$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
165165
}
166166
],
167167
"responses": {
@@ -191,7 +191,7 @@
191191
},
192192
"allOf": [
193193
{
194-
"$ref": "Compute.json#/definitions/Resource"
194+
"$ref": "Compute.json#/definitions/CrpResource"
195195
}
196196
]
197197
},

0 commit comments

Comments
 (0)