From 828b0cdc273aa9dc8ff15bc5829bda427875eff3 Mon Sep 17 00:00:00 2001 From: ArcturusZhang Date: Thu, 13 Jan 2022 15:41:44 +0800 Subject: [PATCH 1/2] move cloud error to common.json --- .../stable/2021-08-01/blob.json | 36 +------------------ .../stable/2021-08-01/common.json | 34 ++++++++++++++++++ .../stable/2021-08-01/file.json | 20 +++++------ .../stable/2021-08-01/queue.json | 16 ++++----- .../stable/2021-08-01/table.json | 16 ++++----- 5 files changed, 61 insertions(+), 61 deletions(-) diff --git a/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/blob.json b/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/blob.json index 91d2c67ff3e2..29171f45ec08 100644 --- a/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/blob.json +++ b/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/blob.json @@ -867,7 +867,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } }, @@ -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": { diff --git a/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/common.json b/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/common.json index 501e37488e1f..fc5ac4887a31 100644 --- a/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/common.json +++ b/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/common.json @@ -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." } } } diff --git a/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/file.json b/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/file.json index 91e57c3c76bd..e3f654603117 100644 --- a/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/file.json +++ b/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/file.json @@ -52,7 +52,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -112,7 +112,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -155,7 +155,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -222,7 +222,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } }, @@ -298,7 +298,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -354,7 +354,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -414,7 +414,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -471,7 +471,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -521,7 +521,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -590,7 +590,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } diff --git a/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/queue.json b/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/queue.json index 1e10eb9dcc03..62e55f9dcc2a 100644 --- a/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/queue.json +++ b/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/queue.json @@ -52,7 +52,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./file.json#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -106,7 +106,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./file.json#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -149,7 +149,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./file.json#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -206,7 +206,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./file.json#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -258,7 +258,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./file.json#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -301,7 +301,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./file.json#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -341,7 +341,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./file.json#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -395,7 +395,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./file.json#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } }, diff --git a/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/table.json b/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/table.json index 83fec538c0de..05ce3976b26d 100644 --- a/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/table.json +++ b/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/table.json @@ -52,7 +52,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./file.json#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -106,7 +106,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./file.json#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -149,7 +149,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./file.json#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -194,7 +194,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./file.json#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -237,7 +237,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./file.json#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -280,7 +280,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./file.json#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -320,7 +320,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./file.json#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } } @@ -362,7 +362,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "./file.json#/definitions/CloudError" + "$ref": "./common.json#/definitions/CloudError" } } }, From 0315f4a19616edc3f26e98cf9dcb19ec4c11dc8a Mon Sep 17 00:00:00 2001 From: ArcturusZhang Date: Thu, 13 Jan 2022 15:58:15 +0800 Subject: [PATCH 2/2] remove definition of Clouderror --- .../stable/2021-08-01/file.json | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/file.json b/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/file.json index e3f654603117..f4b7b5aa0cab 100644 --- a/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/file.json +++ b/specification/storage/resource-manager/Microsoft.Storage/stable/2021-08-01/file.json @@ -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": {