Skip to content

Commit b358aa6

Browse files
david-msftjosuh
authored andcommitted
Swagger Linting Fix (Azure#12162)
* Fix Linting Issuing * no message * fix description * add description and object back * test to resolve model validation test (cherry picked from commit ab273df)
1 parent 4d3e4a8 commit b358aa6

File tree

2 files changed

+80
-11
lines changed

2 files changed

+80
-11
lines changed

specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/examples/createCapacity.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
"azsdktest@microsoft.com",
2020
"azsdktest2@microsoft.com"
2121
]
22-
},
23-
"provisioningState": "Preparing",
24-
"state": "Preparing"
22+
}
2523
}
2624
}
2725
},

specification/powerbidedicated/resource-manager/Microsoft.PowerBIdedicated/stable/2017-10-01/powerbidedicated.json

Lines changed: 79 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@
7676
"schema": {
7777
"$ref": "#/definitions/DedicatedCapacity"
7878
}
79+
},
80+
"default": {
81+
"description": "Error response describing why the operation failed.",
82+
"schema": {
83+
"$ref": "#/definitions/ErrorResponse"
84+
}
7985
}
8086
}
8187
},
@@ -132,6 +138,12 @@
132138
"schema": {
133139
"$ref": "#/definitions/DedicatedCapacity"
134140
}
141+
},
142+
"default": {
143+
"description": "Error response describing why the operation failed.",
144+
"schema": {
145+
"$ref": "#/definitions/ErrorResponse"
146+
}
135147
}
136148
},
137149
"x-ms-long-running-operation": true
@@ -177,6 +189,12 @@
177189
},
178190
"202": {
179191
"description": "Accepted."
192+
},
193+
"default": {
194+
"description": "Error response describing why the operation failed.",
195+
"schema": {
196+
"$ref": "#/definitions/ErrorResponse"
197+
}
180198
}
181199
},
182200
"x-ms-long-running-operation": true
@@ -234,6 +252,12 @@
234252
"schema": {
235253
"$ref": "#/definitions/DedicatedCapacity"
236254
}
255+
},
256+
"default": {
257+
"description": "Error response describing why the operation failed.",
258+
"schema": {
259+
"$ref": "#/definitions/ErrorResponse"
260+
}
237261
}
238262
},
239263
"x-ms-long-running-operation": true
@@ -278,6 +302,12 @@
278302
},
279303
"202": {
280304
"description": "Accepted."
305+
},
306+
"default": {
307+
"description": "Error response describing why the operation failed.",
308+
"schema": {
309+
"$ref": "#/definitions/ErrorResponse"
310+
}
281311
}
282312
},
283313
"x-ms-long-running-operation": true
@@ -322,6 +352,12 @@
322352
},
323353
"202": {
324354
"description": "Accepted"
355+
},
356+
"default": {
357+
"description": "Error response describing why the operation failed.",
358+
"schema": {
359+
"$ref": "#/definitions/ErrorResponse"
360+
}
325361
}
326362
},
327363
"x-ms-long-running-operation": true
@@ -356,6 +392,12 @@
356392
"schema": {
357393
"$ref": "#/definitions/DedicatedCapacities"
358394
}
395+
},
396+
"default": {
397+
"description": "Error response describing why the operation failed.",
398+
"schema": {
399+
"$ref": "#/definitions/ErrorResponse"
400+
}
359401
}
360402
},
361403
"x-ms-pageable": {
@@ -389,6 +431,12 @@
389431
"schema": {
390432
"$ref": "#/definitions/DedicatedCapacities"
391433
}
434+
},
435+
"default": {
436+
"description": "Error response describing why the operation failed.",
437+
"schema": {
438+
"$ref": "#/definitions/ErrorResponse"
439+
}
392440
}
393441
},
394442
"x-ms-pageable": {
@@ -419,6 +467,12 @@
419467
"schema": {
420468
"$ref": "#/definitions/SkuEnumerationForNewResourceResult"
421469
}
470+
},
471+
"default": {
472+
"description": "Error response describing why the operation failed.",
473+
"schema": {
474+
"$ref": "#/definitions/ErrorResponse"
475+
}
422476
}
423477
}
424478
}
@@ -462,6 +516,12 @@
462516
"schema": {
463517
"$ref": "#/definitions/SkuEnumerationForExistingResourceResult"
464518
}
519+
},
520+
"default": {
521+
"description": "Error response describing why the operation failed.",
522+
"schema": {
523+
"$ref": "#/definitions/ErrorResponse"
524+
}
465525
}
466526
}
467527
}
@@ -539,6 +599,12 @@
539599
"schema": {
540600
"$ref": "#/definitions/CheckCapacityNameAvailabilityResult"
541601
}
602+
},
603+
"default": {
604+
"description": "Error response describing why the operation failed.",
605+
"schema": {
606+
"$ref": "#/definitions/ErrorResponse"
607+
}
542608
}
543609
}
544610
}
@@ -831,16 +897,21 @@
831897
}
832898
},
833899
"ErrorResponse": {
834-
"description": "Describes the format of Error response.",
835900
"type": "object",
901+
"description": "Describes the format of Error response.",
836902
"properties": {
837-
"code": {
838-
"description": "Error code",
839-
"type": "string"
840-
},
841-
"message": {
842-
"description": "Error message indicating why the operation failed.",
843-
"type": "string"
903+
"error": {
904+
"description": "The error object",
905+
"properties": {
906+
"code": {
907+
"type": "string",
908+
"description": "Error code"
909+
},
910+
"message": {
911+
"type": "string",
912+
"description": "Error message indicating why the operation failed."
913+
}
914+
}
844915
}
845916
}
846917
},

0 commit comments

Comments
 (0)