Skip to content

Commit

Permalink
Fixerrorresponseschema (#20002)
Browse files Browse the repository at this point in the history
* Fix error response schema for the ListCustomHostNameAnalysis API

* Wrong place
  • Loading branch information
ruslany authored Aug 9, 2022
1 parent 680eab4 commit d62bf7a
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Expand Down Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Expand Down Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
]
}
}
}
}

0 comments on commit d62bf7a

Please sign in to comment.