From bbe9ef1e14c434ff26d2995cea70d5cd01d60efe Mon Sep 17 00:00:00 2001 From: Teng Lu Date: Thu, 13 Feb 2020 12:19:11 -0800 Subject: [PATCH 1/5] [IoTCentral] Change error definition --- .../stable/2018-09-01/iotcentral.json | 53 +++++-------------- 1 file changed, 13 insertions(+), 40 deletions(-) diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json index 89cda44e28af..e5cc989fa65e 100644 --- a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json @@ -70,7 +70,7 @@ "default": { "description": "Default error response", "schema": { - "$ref": "#/definitions/ErrorDetails" + "$ref": "#/definitions/CloudError" } } }, @@ -130,7 +130,7 @@ "default": { "description": "DefaultErrorResponse", "schema": { - "$ref": "#/definitions/ErrorDetails" + "$ref": "#/definitions/CloudError" } } }, @@ -184,7 +184,7 @@ "default": { "description": "DefaultErrorResponse", "schema": { - "$ref": "#/definitions/ErrorDetails" + "$ref": "#/definitions/CloudError" } } }, @@ -229,7 +229,7 @@ "default": { "description": "DefaultErrorResponse", "schema": { - "$ref": "#/definitions/ErrorDetails" + "$ref": "#/definitions/CloudError" } } } @@ -268,7 +268,7 @@ "default": { "description": "DefaultErrorResponse", "schema": { - "$ref": "#/definitions/ErrorDetails" + "$ref": "#/definitions/CloudError" } } }, @@ -311,7 +311,7 @@ "default": { "description": "DefaultErrorResponse", "schema": { - "$ref": "#/definitions/ErrorDetails" + "$ref": "#/definitions/CloudError" } } }, @@ -357,7 +357,7 @@ "default": { "description": "DefaultErrorResponse", "schema": { - "$ref": "#/definitions/ErrorDetails" + "$ref": "#/definitions/CloudError" } } }, @@ -403,7 +403,7 @@ "default": { "description": "DefaultErrorResponse", "schema": { - "$ref": "#/definitions/ErrorDetails" + "$ref": "#/definitions/CloudError" } } }, @@ -443,7 +443,7 @@ "default": { "description": "DefaultErrorResponse", "schema": { - "$ref": "#/definitions/ErrorDetails" + "$ref": "#/definitions/CloudError" } } }, @@ -480,7 +480,7 @@ "default": { "description": "DefaultErrorResponse", "schema": { - "$ref": "#/definitions/ErrorDetails" + "$ref": "#/definitions/CloudError" } } }, @@ -624,41 +624,14 @@ "location" ] }, - "ErrorDetails": { + "CloudError": { "description": "Error details.", + "x-ms-external": true, "properties": { "error": { "description": "Error response body.", "x-ms-client-flatten": true, - "$ref": "#/definitions/ErrorResponseBody" - } - } - }, - "ErrorResponseBody": { - "description": "Details of error response.", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "The error code.", - "readOnly": true - }, - "message": { - "type": "string", - "description": "The error message.", - "readOnly": true - }, - "target": { - "type": "string", - "description": "The target of the particular error.", - "readOnly": true - }, - "details": { - "type": "array", - "description": "A list of additional details about the error.", - "items": { - "$ref": "#/definitions/ErrorResponseBody" - } + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse" } } }, From a7a0b140c31806b8c76319cc723e9f70b2a46887 Mon Sep 17 00:00:00 2001 From: Teng Lu Date: Thu, 13 Feb 2020 13:48:46 -0800 Subject: [PATCH 2/5] [IoTCentral] Change error definition --- .../stable/2018-09-01/iotcentral.json | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json index e5cc989fa65e..a405ac4c88fe 100644 --- a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json @@ -631,7 +631,35 @@ "error": { "description": "Error response body.", "x-ms-client-flatten": true, - "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponseBody" + } + } + }, + "ErrorResponseBody": { + "description": "Details of error response.", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The error code.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "The error message.", + "readOnly": true + }, + "target": { + "type": "string", + "description": "The target of the particular error.", + "readOnly": true + }, + "details": { + "type": "array", + "description": "A list of additional details about the error.", + "items": { + "$ref": "#/definitions/ErrorResponseBody" + } } } }, From 9578d36ef49d11e323741cf0784cdad772bc51fe Mon Sep 17 00:00:00 2001 From: Teng Lu Date: Thu, 13 Feb 2020 13:53:25 -0800 Subject: [PATCH 3/5] [IoTCentral] Change error definition --- .../Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json index a405ac4c88fe..f4de6b97c83f 100644 --- a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json @@ -631,11 +631,11 @@ "error": { "description": "Error response body.", "x-ms-client-flatten": true, - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "#/definitions/CloudErrorResponseBody" } } }, - "ErrorResponseBody": { + "CloudErrorResponseBody": { "description": "Details of error response.", "type": "object", "properties": { @@ -658,7 +658,7 @@ "type": "array", "description": "A list of additional details about the error.", "items": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "#/definitions/CloudErrorResponseBody" } } } From 6da3ab042340e740ade3bd66b6bd8f6f02ce0552 Mon Sep 17 00:00:00 2001 From: Teng Lu Date: Fri, 28 Feb 2020 11:14:01 -0800 Subject: [PATCH 4/5] [IoTCentral] Change error definition --- .../stable/2018-09-01/iotcentral.json | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json index f4de6b97c83f..9b272ab73443 100644 --- a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json @@ -500,13 +500,11 @@ }, "displayName": { "description": "The display name of the application.", - "type": "string", - "pattern": "^.{1,200}$" + "type": "string" }, "subdomain": { "description": "The subdomain of the application.", - "type": "string", - "pattern": "^[a-z0-9-]{1,63}$" + "type": "string" }, "template": { "description": "The ID of the application template, which is a blueprint that defines the characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch.", @@ -745,8 +743,7 @@ "properties": { "name": { "description": "The name of the IoT Central application instance to check.", - "type": "string", - "pattern": "^[a-z0-9-]{1,63}$" + "type": "string" }, "type": { "description": "The type of the IoT Central resource to query.", From ea1dcaaff2c62789169209eea0e3f80cd735bae4 Mon Sep 17 00:00:00 2001 From: Teng Lu Date: Mon, 2 Mar 2020 10:13:05 -0800 Subject: [PATCH 5/5] [IoTCentral] Change error definition --- .../Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json index 9b272ab73443..8958ac279f14 100644 --- a/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json +++ b/specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2018-09-01/iotcentral.json @@ -629,11 +629,11 @@ "error": { "description": "Error response body.", "x-ms-client-flatten": true, - "$ref": "#/definitions/CloudErrorResponseBody" + "$ref": "#/definitions/CloudErrorBody" } } }, - "CloudErrorResponseBody": { + "CloudErrorBody": { "description": "Details of error response.", "type": "object", "properties": { @@ -656,7 +656,7 @@ "type": "array", "description": "A list of additional details about the error.", "items": { - "$ref": "#/definitions/CloudErrorResponseBody" + "$ref": "#/definitions/CloudErrorBody" } } }