From fc8e0408bd95c2dcb86cb122eac9d7cb39ef4e90 Mon Sep 17 00:00:00 2001 From: xiaoxu qi Date: Fri, 14 Apr 2023 09:22:47 +0800 Subject: [PATCH] fix lro final-state-via and revert change of ErrorResponse (#23544) * fix lro final-state-via * revert replication role * revert cloudError --- .../2022-01-01/AzureADAdministrator.json | 19 +++++++-- .../Backups/stable/2022-01-01/Backups.json | 17 ++++++-- .../2021-12-01-preview/Configurations.json | 5 +-- .../stable/2022-01-01/Configurations.json | 26 ++++++++----- .../stable/2022-01-01/Databases.json | 24 ++++++++---- .../stable/2022-01-01/FirewallRules.json | 24 ++++++++---- .../2021-12-01-preview/FlexibleServers.json | 2 +- .../stable/2022-01-01/FlexibleServers.json | 39 ++++++++++++------- .../LogFiles/stable/2022-01-01/LogFiles.json | 13 ++++++- .../stable/2022-01-01/ServiceOperations.json | 23 ++++++++--- 10 files changed, 133 insertions(+), 59 deletions(-) diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2022-01-01/AzureADAdministrator.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2022-01-01/AzureADAdministrator.json index 8ed2829b6420..d9938451dca5 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2022-01-01/AzureADAdministrator.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2022-01-01/AzureADAdministrator.json @@ -96,7 +96,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -148,7 +148,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -195,7 +195,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } } @@ -237,7 +237,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -318,6 +318,17 @@ } }, "description": "A List of azure ad administrators." + }, + "CloudError": { + "type": "object", + "x-ms-external": true, + "properties": { + "error": { + "$ref": "../../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse", + "description": "The resource management error response." + } + }, + "description": "An error response from the Batch service." } }, "parameters": { diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2022-01-01/Backups.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2022-01-01/Backups.json index 271b3065e890..cafad5cefec0 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2022-01-01/Backups.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2022-01-01/Backups.json @@ -73,7 +73,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } } @@ -116,7 +116,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } } @@ -158,7 +158,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -225,6 +225,17 @@ } }, "description": "A list of server backups." + }, + "CloudError": { + "type": "object", + "x-ms-external": true, + "properties": { + "error": { + "$ref": "../../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse", + "description": "The resource management error response." + } + }, + "description": "An error response from the Batch service." } }, "parameters": { diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/Configurations.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/Configurations.json index 05b2c36a9c9b..8f4b1e8c3e95 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/Configurations.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2021-12-01-preview/Configurations.json @@ -94,10 +94,7 @@ } } }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - } + "x-ms-long-running-operation": true }, "patch": { "tags": [ diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2022-01-01/Configurations.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2022-01-01/Configurations.json index 2f7357a9924e..280da289a5a6 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2022-01-01/Configurations.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2022-01-01/Configurations.json @@ -90,14 +90,11 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - } + "x-ms-long-running-operation": true }, "patch": { "tags": [ @@ -154,7 +151,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -198,7 +195,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } } @@ -257,7 +254,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -315,7 +312,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -504,6 +501,17 @@ } }, "description": "A list of server configurations to update." + }, + "CloudError": { + "type": "object", + "x-ms-external": true, + "properties": { + "error": { + "$ref": "../../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse", + "description": "The resource management error response." + } + }, + "description": "An error response from the Batch service." } }, "parameters": { diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2022-01-01/Databases.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2022-01-01/Databases.json index ec27a4869b8c..388c5097cf89 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2022-01-01/Databases.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2022-01-01/Databases.json @@ -96,7 +96,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -148,14 +148,11 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - } + "x-ms-long-running-operation": true }, "get": { "tags": [ @@ -195,7 +192,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } } @@ -237,7 +234,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -299,6 +296,17 @@ } }, "description": "A List of databases." + }, + "CloudError": { + "type": "object", + "x-ms-external": true, + "properties": { + "error": { + "$ref": "../../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse", + "description": "The resource management error response." + } + }, + "description": "An error response from the Batch service." } }, "parameters": { diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2022-01-01/FirewallRules.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2022-01-01/FirewallRules.json index 9c9d05e89c31..a3c94d9d599f 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2022-01-01/FirewallRules.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2022-01-01/FirewallRules.json @@ -96,7 +96,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -148,14 +148,11 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - } + "x-ms-long-running-operation": true }, "get": { "tags": [ @@ -195,7 +192,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } } @@ -237,7 +234,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -308,6 +305,17 @@ } }, "description": "A list of firewall rules." + }, + "CloudError": { + "type": "object", + "x-ms-external": true, + "properties": { + "error": { + "$ref": "../../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse", + "description": "The resource management error response." + } + }, + "description": "An error response from the Batch service." } }, "parameters": { diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2021-12-01-preview/FlexibleServers.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2021-12-01-preview/FlexibleServers.json index bc83ec68a879..6e98d4c28aed 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2021-12-01-preview/FlexibleServers.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2021-12-01-preview/FlexibleServers.json @@ -206,7 +206,7 @@ }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { - "final-state-via": "location" + "final-state-via": "azure-async-operation" } }, "get": { diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2022-01-01/FlexibleServers.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2022-01-01/FlexibleServers.json index 732e546fa435..227f7495505f 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2022-01-01/FlexibleServers.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2022-01-01/FlexibleServers.json @@ -102,7 +102,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -166,7 +166,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -215,7 +215,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -259,7 +259,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } } @@ -298,7 +298,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -337,7 +337,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -387,7 +387,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -444,7 +444,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -492,7 +492,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -540,7 +540,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -583,7 +583,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -616,8 +616,7 @@ "x-ms-enum": { "name": "EnableStatusEnum", "modelAsString": true - }, - "default": "Disabled" + } }, "ReplicationRole": { "type": "string", @@ -630,8 +629,7 @@ "name": "ReplicationRole", "modelAsString": true }, - "description": "The replication role.", - "readOnly": true + "description": "The replication role." }, "DataEncryption": { "type": "object", @@ -1145,6 +1143,17 @@ } }, "description": "Metadata of user assigned identity." + }, + "CloudError": { + "type": "object", + "x-ms-external": true, + "properties": { + "error": { + "$ref": "../../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse", + "description": "The resource management error response." + } + }, + "description": "An error response from the Batch service." } }, "parameters": { diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/stable/2022-01-01/LogFiles.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/stable/2022-01-01/LogFiles.json index 5ddaededc5a1..f8775c1a6d45 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/stable/2022-01-01/LogFiles.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/stable/2022-01-01/LogFiles.json @@ -70,7 +70,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -147,6 +147,17 @@ } }, "description": "A List of logFiles." + }, + "CloudError": { + "type": "object", + "x-ms-external": true, + "properties": { + "error": { + "$ref": "../../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse", + "description": "The resource management error response." + } + }, + "description": "An error response from the Batch service." } }, "parameters": { diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2022-01-01/ServiceOperations.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2022-01-01/ServiceOperations.json index c7315957cb76..21783709ddc3 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2022-01-01/ServiceOperations.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2022-01-01/ServiceOperations.json @@ -67,7 +67,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -118,7 +118,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } } @@ -166,7 +166,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } } @@ -211,7 +211,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } } @@ -244,7 +244,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } } @@ -277,7 +277,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/CloudError" } } }, @@ -620,6 +620,17 @@ "type": "string" } } + }, + "CloudError": { + "type": "object", + "x-ms-external": true, + "properties": { + "error": { + "$ref": "../../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse", + "description": "The resource management error response." + } + }, + "description": "An error response from the Batch service." } }, "parameters": {