Skip to content

Commit

Permalink
[Storage] move CloudError to common.json to resolve the duplicate s…
Browse files Browse the repository at this point in the history
…chema issue (Azure#17336)

* move cloud error to common.json

* remove definition of Clouderror
  • Loading branch information
ArcturusZhang authored and LeiWang3 committed Mar 31, 2022
1 parent 6205ca5 commit d7e1806
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 95 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
},
Expand Down Expand Up @@ -1508,40 +1508,6 @@
}
},
"description": "Lease Container response schema."
},
"CloudError": {
"x-ms-external": true,
"properties": {
"error": {
"$ref": "#/definitions/CloudErrorBody"
}
},
"description": "An error response from the Storage service."
},
"CloudErrorBody": {
"x-ms-external": true,
"properties": {
"code": {
"type": "string",
"description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically."
},
"message": {
"type": "string",
"description": "A message describing the error, intended to be suitable for display in a user interface."
},
"target": {
"type": "string",
"description": "The target of the particular error. For example, the name of the property in error."
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/CloudErrorBody"
},
"description": "A list of additional details about the error."
}
},
"description": "An error response from the Storage service."
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,40 @@
"name": "SkuTier",
"modelAsString": false
}
},
"CloudError": {
"x-ms-external": true,
"properties": {
"error": {
"$ref": "#/definitions/CloudErrorBody"
}
},
"description": "An error response from the Storage service."
},
"CloudErrorBody": {
"x-ms-external": true,
"properties": {
"code": {
"type": "string",
"description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically."
},
"message": {
"type": "string",
"description": "A message describing the error, intended to be suitable for display in a user interface."
},
"target": {
"type": "string",
"description": "The target of the particular error. For example, the name of the property in error."
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/CloudErrorBody"
},
"description": "A list of additional details about the error."
}
},
"description": "An error response from the Storage service."
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -112,7 +112,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -155,7 +155,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -222,7 +222,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
},
Expand Down Expand Up @@ -298,7 +298,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -354,7 +354,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -414,7 +414,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -471,7 +471,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -521,7 +521,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -590,7 +590,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -996,40 +996,6 @@
"description": "List of abbreviated permissions."
}
}
},
"CloudError": {
"x-ms-external": true,
"properties": {
"error": {
"$ref": "#/definitions/CloudErrorBody"
}
},
"description": "An error response from the Storage service."
},
"CloudErrorBody": {
"x-ms-external": true,
"properties": {
"code": {
"type": "string",
"description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically."
},
"message": {
"type": "string",
"description": "A message describing the error, intended to be suitable for display in a user interface."
},
"target": {
"type": "string",
"description": "The target of the particular error. For example, the name of the property in error."
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/CloudErrorBody"
},
"description": "A list of additional details about the error."
}
},
"description": "An error response from the Storage service."
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./file.json#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -106,7 +106,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./file.json#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -149,7 +149,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./file.json#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -206,7 +206,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./file.json#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -258,7 +258,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./file.json#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -301,7 +301,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./file.json#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -341,7 +341,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./file.json#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -395,7 +395,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./file.json#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./file.json#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -106,7 +106,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./file.json#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -149,7 +149,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./file.json#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -194,7 +194,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./file.json#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -237,7 +237,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./file.json#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -280,7 +280,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./file.json#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -320,7 +320,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./file.json#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
}
Expand Down Expand Up @@ -362,7 +362,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./file.json#/definitions/CloudError"
"$ref": "./common.json#/definitions/CloudError"
}
}
},
Expand Down

0 comments on commit d7e1806

Please sign in to comment.