From d62bf7ac84940147fc5c0faceaac111b1a8c360d Mon Sep 17 00:00:00 2001 From: Ruslan Yakushev <1664475+ruslany@users.noreply.github.com> Date: Mon, 8 Aug 2022 21:01:44 -0700 Subject: [PATCH] Fixerrorresponseschema (#20002) * Fix error response schema for the ListCustomHostNameAnalysis API * Wrong place --- .../2022-01-01-preview/ContainerApps.json | 51 ++++++++++++++++++- ...stCustomHostNameAnalysisErrorResponse.json | 33 ++++++++++++ .../stable/2022-03-01/ContainerApps.json | 51 ++++++++++++++++++- ...stCustomHostNameAnalysisErrorResponse.json | 33 ++++++++++++ 4 files changed, 166 insertions(+), 2 deletions(-) create mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListCustomHostNameAnalysisErrorResponse.json create mode 100644 specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListCustomHostNameAnalysisErrorResponse.json diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json index 941dc207f39a..dfec548ea529 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json @@ -358,6 +358,9 @@ "x-ms-examples": { "Analyze Custom Hostname": { "$ref": "./examples/ContainerApps_ListCustomHostNameAnalysis.json" + }, + "Analyse Custom Hostname Error Response": { + "$ref": "./examples/ContainerApps_ListCustomHostNameAnalysisErrorResponse.json" } } } @@ -788,8 +791,54 @@ } }, "customDomainVerificationFailureInfo": { - "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse", "description": "Raw failure information if DNS verification fails.", + "type": "object", + "properties": { + "code": { + "description": "Standardized string to programmatically identify the error.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Detailed error description and debugging information.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "Detailed error description and debugging information.", + "type": "string", + "readOnly": true + }, + "details": { + "type": "array", + "description": "Details or the error", + "items": { + "description": "Detailed errors.", + "type": "object", + "properties": { + "code": { + "description": "Standardized string to programmatically identify the error.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Detailed error description and debugging information.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "Detailed error description and debugging information.", + "type": "string", + "readOnly": true + } + }, + "readOnly": true + }, + "x-ms-identifiers": [ + "code" + ] + } + }, "readOnly": true }, "hasConflictOnManagedEnvironment": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListCustomHostNameAnalysisErrorResponse.json b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListCustomHostNameAnalysisErrorResponse.json new file mode 100644 index 000000000000..77180aa3287c --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/examples/ContainerApps_ListCustomHostNameAnalysisErrorResponse.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "rg", + "containerAppName": "testcontainerApp0", + "customHostname": "my.name.corp", + "api-version": "2022-01-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "isHostnameAlreadyVerified": false, + "customDomainVerificationTest": "Failed", + "customDomainVerificationFailureInfo": { + "code": "InvalidCustomHostNameValidation", + "message": "A TXT record pointing from my.name.corp to AF365AD7C598B96CFCB1EA1A803A44A8F861436767173A251F6E9B7027FF078E was not found." + }, + "hasConflictOnManagedEnvironment": false, + "cNameRecords": [], + "txtRecords": [ + "652modgx8o8y2t0ahxci" + ], + "aRecords": [ + "40.112.243.18" + ], + "alternateTxtRecords": [ + "7301B614D78FC456A5F1F9002CF1A31B6116D7AC5DEDC128C5DE6CCC90F3BE1C" + ] + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/ContainerApps.json index 5f8972bd72af..734e1d6be1fb 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/ContainerApps.json @@ -356,6 +356,9 @@ "x-ms-examples": { "Analyze Custom Hostname": { "$ref": "./examples/ContainerApps_ListCustomHostNameAnalysis.json" + }, + "Analyse Custom Hostname Error Response": { + "$ref": "./examples/ContainerApps_ListCustomHostNameAnalysisErrorResponse.json" } } } @@ -781,8 +784,54 @@ } }, "customDomainVerificationFailureInfo": { - "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse", "description": "Raw failure information if DNS verification fails.", + "type": "object", + "properties": { + "code": { + "description": "Standardized string to programmatically identify the error.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Detailed error description and debugging information.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "Detailed error description and debugging information.", + "type": "string", + "readOnly": true + }, + "details": { + "type": "array", + "description": "Details or the error", + "items": { + "description": "Detailed errors.", + "type": "object", + "properties": { + "code": { + "description": "Standardized string to programmatically identify the error.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Detailed error description and debugging information.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "Detailed error description and debugging information.", + "type": "string", + "readOnly": true + } + }, + "readOnly": true + }, + "x-ms-identifiers": [ + "code" + ] + } + }, "readOnly": true }, "hasConflictOnManagedEnvironment": { diff --git a/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListCustomHostNameAnalysisErrorResponse.json b/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListCustomHostNameAnalysisErrorResponse.json new file mode 100644 index 000000000000..304bf1a1fa56 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListCustomHostNameAnalysisErrorResponse.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "rg", + "containerAppName": "testcontainerApp0", + "customHostname": "my.name.corp", + "api-version": "2022-03-03" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "isHostnameAlreadyVerified": false, + "customDomainVerificationTest": "Failed", + "customDomainVerificationFailureInfo": { + "code": "InvalidCustomHostNameValidation", + "message": "A TXT record pointing from my.name.corp to AF365AD7C598B96CFCB1EA1A803A44A8F861436767173A251F6E9B7027FF078E was not found." + }, + "hasConflictOnManagedEnvironment": false, + "cNameRecords": [], + "txtRecords": [ + "652modgx8o8y2t0ahxci" + ], + "aRecords": [ + "40.112.243.18" + ], + "alternateTxtRecords": [ + "7301B614D78FC456A5F1F9002CF1A31B6116D7AC5DEDC128C5DE6CCC90F3BE1C" + ] + } + } + } +}