Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 763d299

Browse files
ArcturusZhangmstrisoline
authored andcommittedFeb 1, 2022
[Storage] move CloudError to common.json to resolve the duplicate schema issue (Azure#17336)
* move cloud error to common.json * remove definition of Clouderror
1 parent 97d1766 commit 763d299

File tree

5 files changed

+61
-95
lines changed

5 files changed

+61
-95
lines changed
 

‎specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/blob.json

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@
867867
"default": {
868868
"description": "Error response describing why the operation failed.",
869869
"schema": {
870-
"$ref": "#/definitions/CloudError"
870+
"$ref": "./common.json#/definitions/CloudError"
871871
}
872872
}
873873
},
@@ -1508,40 +1508,6 @@
15081508
}
15091509
},
15101510
"description": "Lease Container response schema."
1511-
},
1512-
"CloudError": {
1513-
"x-ms-external": true,
1514-
"properties": {
1515-
"error": {
1516-
"$ref": "#/definitions/CloudErrorBody"
1517-
}
1518-
},
1519-
"description": "An error response from the Storage service."
1520-
},
1521-
"CloudErrorBody": {
1522-
"x-ms-external": true,
1523-
"properties": {
1524-
"code": {
1525-
"type": "string",
1526-
"description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically."
1527-
},
1528-
"message": {
1529-
"type": "string",
1530-
"description": "A message describing the error, intended to be suitable for display in a user interface."
1531-
},
1532-
"target": {
1533-
"type": "string",
1534-
"description": "The target of the particular error. For example, the name of the property in error."
1535-
},
1536-
"details": {
1537-
"type": "array",
1538-
"items": {
1539-
"$ref": "#/definitions/CloudErrorBody"
1540-
},
1541-
"description": "A list of additional details about the error."
1542-
}
1543-
},
1544-
"description": "An error response from the Storage service."
15451511
}
15461512
},
15471513
"parameters": {

‎specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/common.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,40 @@
132132
"name": "SkuTier",
133133
"modelAsString": false
134134
}
135+
},
136+
"CloudError": {
137+
"x-ms-external": true,
138+
"properties": {
139+
"error": {
140+
"$ref": "#/definitions/CloudErrorBody"
141+
}
142+
},
143+
"description": "An error response from the Storage service."
144+
},
145+
"CloudErrorBody": {
146+
"x-ms-external": true,
147+
"properties": {
148+
"code": {
149+
"type": "string",
150+
"description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically."
151+
},
152+
"message": {
153+
"type": "string",
154+
"description": "A message describing the error, intended to be suitable for display in a user interface."
155+
},
156+
"target": {
157+
"type": "string",
158+
"description": "The target of the particular error. For example, the name of the property in error."
159+
},
160+
"details": {
161+
"type": "array",
162+
"items": {
163+
"$ref": "#/definitions/CloudErrorBody"
164+
},
165+
"description": "A list of additional details about the error."
166+
}
167+
},
168+
"description": "An error response from the Storage service."
135169
}
136170
}
137171
}

‎specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/file.json

Lines changed: 10 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"default": {
5353
"description": "Error response describing why the operation failed.",
5454
"schema": {
55-
"$ref": "#/definitions/CloudError"
55+
"$ref": "./common.json#/definitions/CloudError"
5656
}
5757
}
5858
}
@@ -112,7 +112,7 @@
112112
"default": {
113113
"description": "Error response describing why the operation failed.",
114114
"schema": {
115-
"$ref": "#/definitions/CloudError"
115+
"$ref": "./common.json#/definitions/CloudError"
116116
}
117117
}
118118
}
@@ -155,7 +155,7 @@
155155
"default": {
156156
"description": "Error response describing why the operation failed.",
157157
"schema": {
158-
"$ref": "#/definitions/CloudError"
158+
"$ref": "./common.json#/definitions/CloudError"
159159
}
160160
}
161161
}
@@ -222,7 +222,7 @@
222222
"default": {
223223
"description": "Error response describing why the operation failed.",
224224
"schema": {
225-
"$ref": "#/definitions/CloudError"
225+
"$ref": "./common.json#/definitions/CloudError"
226226
}
227227
}
228228
},
@@ -298,7 +298,7 @@
298298
"default": {
299299
"description": "Error response describing why the operation failed.",
300300
"schema": {
301-
"$ref": "#/definitions/CloudError"
301+
"$ref": "./common.json#/definitions/CloudError"
302302
}
303303
}
304304
}
@@ -354,7 +354,7 @@
354354
"default": {
355355
"description": "Error response describing why the operation failed.",
356356
"schema": {
357-
"$ref": "#/definitions/CloudError"
357+
"$ref": "./common.json#/definitions/CloudError"
358358
}
359359
}
360360
}
@@ -414,7 +414,7 @@
414414
"default": {
415415
"description": "Error response describing why the operation failed.",
416416
"schema": {
417-
"$ref": "#/definitions/CloudError"
417+
"$ref": "./common.json#/definitions/CloudError"
418418
}
419419
}
420420
}
@@ -471,7 +471,7 @@
471471
"default": {
472472
"description": "Error response describing why the operation failed.",
473473
"schema": {
474-
"$ref": "#/definitions/CloudError"
474+
"$ref": "./common.json#/definitions/CloudError"
475475
}
476476
}
477477
}
@@ -521,7 +521,7 @@
521521
"default": {
522522
"description": "Error response describing why the operation failed.",
523523
"schema": {
524-
"$ref": "#/definitions/CloudError"
524+
"$ref": "./common.json#/definitions/CloudError"
525525
}
526526
}
527527
}
@@ -590,7 +590,7 @@
590590
"default": {
591591
"description": "Error response describing why the operation failed.",
592592
"schema": {
593-
"$ref": "#/definitions/CloudError"
593+
"$ref": "./common.json#/definitions/CloudError"
594594
}
595595
}
596596
}
@@ -996,40 +996,6 @@
996996
"description": "List of abbreviated permissions."
997997
}
998998
}
999-
},
1000-
"CloudError": {
1001-
"x-ms-external": true,
1002-
"properties": {
1003-
"error": {
1004-
"$ref": "#/definitions/CloudErrorBody"
1005-
}
1006-
},
1007-
"description": "An error response from the Storage service."
1008-
},
1009-
"CloudErrorBody": {
1010-
"x-ms-external": true,
1011-
"properties": {
1012-
"code": {
1013-
"type": "string",
1014-
"description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically."
1015-
},
1016-
"message": {
1017-
"type": "string",
1018-
"description": "A message describing the error, intended to be suitable for display in a user interface."
1019-
},
1020-
"target": {
1021-
"type": "string",
1022-
"description": "The target of the particular error. For example, the name of the property in error."
1023-
},
1024-
"details": {
1025-
"type": "array",
1026-
"items": {
1027-
"$ref": "#/definitions/CloudErrorBody"
1028-
},
1029-
"description": "A list of additional details about the error."
1030-
}
1031-
},
1032-
"description": "An error response from the Storage service."
1033999
}
10341000
},
10351001
"parameters": {

‎specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/queue.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"default": {
5353
"description": "Error response describing why the operation failed.",
5454
"schema": {
55-
"$ref": "./file.json#/definitions/CloudError"
55+
"$ref": "./common.json#/definitions/CloudError"
5656
}
5757
}
5858
}
@@ -106,7 +106,7 @@
106106
"default": {
107107
"description": "Error response describing why the operation failed.",
108108
"schema": {
109-
"$ref": "./file.json#/definitions/CloudError"
109+
"$ref": "./common.json#/definitions/CloudError"
110110
}
111111
}
112112
}
@@ -149,7 +149,7 @@
149149
"default": {
150150
"description": "Error response describing why the operation failed.",
151151
"schema": {
152-
"$ref": "./file.json#/definitions/CloudError"
152+
"$ref": "./common.json#/definitions/CloudError"
153153
}
154154
}
155155
}
@@ -206,7 +206,7 @@
206206
"default": {
207207
"description": "Error response describing why the operation failed.",
208208
"schema": {
209-
"$ref": "./file.json#/definitions/CloudError"
209+
"$ref": "./common.json#/definitions/CloudError"
210210
}
211211
}
212212
}
@@ -258,7 +258,7 @@
258258
"default": {
259259
"description": "Error response describing why the operation failed.",
260260
"schema": {
261-
"$ref": "./file.json#/definitions/CloudError"
261+
"$ref": "./common.json#/definitions/CloudError"
262262
}
263263
}
264264
}
@@ -301,7 +301,7 @@
301301
"default": {
302302
"description": "Error response describing why the operation failed.",
303303
"schema": {
304-
"$ref": "./file.json#/definitions/CloudError"
304+
"$ref": "./common.json#/definitions/CloudError"
305305
}
306306
}
307307
}
@@ -341,7 +341,7 @@
341341
"default": {
342342
"description": "Error response describing why the operation failed.",
343343
"schema": {
344-
"$ref": "./file.json#/definitions/CloudError"
344+
"$ref": "./common.json#/definitions/CloudError"
345345
}
346346
}
347347
}
@@ -395,7 +395,7 @@
395395
"default": {
396396
"description": "Error response describing why the operation failed.",
397397
"schema": {
398-
"$ref": "./file.json#/definitions/CloudError"
398+
"$ref": "./common.json#/definitions/CloudError"
399399
}
400400
}
401401
},

‎specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/table.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"default": {
5353
"description": "Error response describing why the operation failed.",
5454
"schema": {
55-
"$ref": "./file.json#/definitions/CloudError"
55+
"$ref": "./common.json#/definitions/CloudError"
5656
}
5757
}
5858
}
@@ -106,7 +106,7 @@
106106
"default": {
107107
"description": "Error response describing why the operation failed.",
108108
"schema": {
109-
"$ref": "./file.json#/definitions/CloudError"
109+
"$ref": "./common.json#/definitions/CloudError"
110110
}
111111
}
112112
}
@@ -149,7 +149,7 @@
149149
"default": {
150150
"description": "Error response describing why the operation failed.",
151151
"schema": {
152-
"$ref": "./file.json#/definitions/CloudError"
152+
"$ref": "./common.json#/definitions/CloudError"
153153
}
154154
}
155155
}
@@ -194,7 +194,7 @@
194194
"default": {
195195
"description": "Error response describing why the operation failed.",
196196
"schema": {
197-
"$ref": "./file.json#/definitions/CloudError"
197+
"$ref": "./common.json#/definitions/CloudError"
198198
}
199199
}
200200
}
@@ -237,7 +237,7 @@
237237
"default": {
238238
"description": "Error response describing why the operation failed.",
239239
"schema": {
240-
"$ref": "./file.json#/definitions/CloudError"
240+
"$ref": "./common.json#/definitions/CloudError"
241241
}
242242
}
243243
}
@@ -280,7 +280,7 @@
280280
"default": {
281281
"description": "Error response describing why the operation failed.",
282282
"schema": {
283-
"$ref": "./file.json#/definitions/CloudError"
283+
"$ref": "./common.json#/definitions/CloudError"
284284
}
285285
}
286286
}
@@ -320,7 +320,7 @@
320320
"default": {
321321
"description": "Error response describing why the operation failed.",
322322
"schema": {
323-
"$ref": "./file.json#/definitions/CloudError"
323+
"$ref": "./common.json#/definitions/CloudError"
324324
}
325325
}
326326
}
@@ -362,7 +362,7 @@
362362
"default": {
363363
"description": "Error response describing why the operation failed.",
364364
"schema": {
365-
"$ref": "./file.json#/definitions/CloudError"
365+
"$ref": "./common.json#/definitions/CloudError"
366366
}
367367
}
368368
},

0 commit comments

Comments
 (0)