Skip to content

Commit d62bf7a

Browse files
authored
Fixerrorresponseschema (#20002)
* Fix error response schema for the ListCustomHostNameAnalysis API * Wrong place
1 parent 680eab4 commit d62bf7a

File tree

4 files changed

+166
-2
lines changed

4 files changed

+166
-2
lines changed

specification/app/resource-manager/Microsoft.App/preview/2022-01-01-preview/ContainerApps.json

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,9 @@
358358
"x-ms-examples": {
359359
"Analyze Custom Hostname": {
360360
"$ref": "./examples/ContainerApps_ListCustomHostNameAnalysis.json"
361+
},
362+
"Analyse Custom Hostname Error Response": {
363+
"$ref": "./examples/ContainerApps_ListCustomHostNameAnalysisErrorResponse.json"
361364
}
362365
}
363366
}
@@ -788,8 +791,54 @@
788791
}
789792
},
790793
"customDomainVerificationFailureInfo": {
791-
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse",
792794
"description": "Raw failure information if DNS verification fails.",
795+
"type": "object",
796+
"properties": {
797+
"code": {
798+
"description": "Standardized string to programmatically identify the error.",
799+
"type": "string",
800+
"readOnly": true
801+
},
802+
"message": {
803+
"description": "Detailed error description and debugging information.",
804+
"type": "string",
805+
"readOnly": true
806+
},
807+
"target": {
808+
"description": "Detailed error description and debugging information.",
809+
"type": "string",
810+
"readOnly": true
811+
},
812+
"details": {
813+
"type": "array",
814+
"description": "Details or the error",
815+
"items": {
816+
"description": "Detailed errors.",
817+
"type": "object",
818+
"properties": {
819+
"code": {
820+
"description": "Standardized string to programmatically identify the error.",
821+
"type": "string",
822+
"readOnly": true
823+
},
824+
"message": {
825+
"description": "Detailed error description and debugging information.",
826+
"type": "string",
827+
"readOnly": true
828+
},
829+
"target": {
830+
"description": "Detailed error description and debugging information.",
831+
"type": "string",
832+
"readOnly": true
833+
}
834+
},
835+
"readOnly": true
836+
},
837+
"x-ms-identifiers": [
838+
"code"
839+
]
840+
}
841+
},
793842
"readOnly": true
794843
},
795844
"hasConflictOnManagedEnvironment": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
4+
"resourceGroupName": "rg",
5+
"containerAppName": "testcontainerApp0",
6+
"customHostname": "my.name.corp",
7+
"api-version": "2022-01-01-preview"
8+
},
9+
"responses": {
10+
"200": {
11+
"headers": {},
12+
"body": {
13+
"isHostnameAlreadyVerified": false,
14+
"customDomainVerificationTest": "Failed",
15+
"customDomainVerificationFailureInfo": {
16+
"code": "InvalidCustomHostNameValidation",
17+
"message": "A TXT record pointing from my.name.corp to AF365AD7C598B96CFCB1EA1A803A44A8F861436767173A251F6E9B7027FF078E was not found."
18+
},
19+
"hasConflictOnManagedEnvironment": false,
20+
"cNameRecords": [],
21+
"txtRecords": [
22+
"652modgx8o8y2t0ahxci"
23+
],
24+
"aRecords": [
25+
"40.112.243.18"
26+
],
27+
"alternateTxtRecords": [
28+
"7301B614D78FC456A5F1F9002CF1A31B6116D7AC5DEDC128C5DE6CCC90F3BE1C"
29+
]
30+
}
31+
}
32+
}
33+
}

specification/app/resource-manager/Microsoft.App/stable/2022-03-01/ContainerApps.json

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,9 @@
356356
"x-ms-examples": {
357357
"Analyze Custom Hostname": {
358358
"$ref": "./examples/ContainerApps_ListCustomHostNameAnalysis.json"
359+
},
360+
"Analyse Custom Hostname Error Response": {
361+
"$ref": "./examples/ContainerApps_ListCustomHostNameAnalysisErrorResponse.json"
359362
}
360363
}
361364
}
@@ -781,8 +784,54 @@
781784
}
782785
},
783786
"customDomainVerificationFailureInfo": {
784-
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse",
785787
"description": "Raw failure information if DNS verification fails.",
788+
"type": "object",
789+
"properties": {
790+
"code": {
791+
"description": "Standardized string to programmatically identify the error.",
792+
"type": "string",
793+
"readOnly": true
794+
},
795+
"message": {
796+
"description": "Detailed error description and debugging information.",
797+
"type": "string",
798+
"readOnly": true
799+
},
800+
"target": {
801+
"description": "Detailed error description and debugging information.",
802+
"type": "string",
803+
"readOnly": true
804+
},
805+
"details": {
806+
"type": "array",
807+
"description": "Details or the error",
808+
"items": {
809+
"description": "Detailed errors.",
810+
"type": "object",
811+
"properties": {
812+
"code": {
813+
"description": "Standardized string to programmatically identify the error.",
814+
"type": "string",
815+
"readOnly": true
816+
},
817+
"message": {
818+
"description": "Detailed error description and debugging information.",
819+
"type": "string",
820+
"readOnly": true
821+
},
822+
"target": {
823+
"description": "Detailed error description and debugging information.",
824+
"type": "string",
825+
"readOnly": true
826+
}
827+
},
828+
"readOnly": true
829+
},
830+
"x-ms-identifiers": [
831+
"code"
832+
]
833+
}
834+
},
786835
"readOnly": true
787836
},
788837
"hasConflictOnManagedEnvironment": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
4+
"resourceGroupName": "rg",
5+
"containerAppName": "testcontainerApp0",
6+
"customHostname": "my.name.corp",
7+
"api-version": "2022-03-03"
8+
},
9+
"responses": {
10+
"200": {
11+
"headers": {},
12+
"body": {
13+
"isHostnameAlreadyVerified": false,
14+
"customDomainVerificationTest": "Failed",
15+
"customDomainVerificationFailureInfo": {
16+
"code": "InvalidCustomHostNameValidation",
17+
"message": "A TXT record pointing from my.name.corp to AF365AD7C598B96CFCB1EA1A803A44A8F861436767173A251F6E9B7027FF078E was not found."
18+
},
19+
"hasConflictOnManagedEnvironment": false,
20+
"cNameRecords": [],
21+
"txtRecords": [
22+
"652modgx8o8y2t0ahxci"
23+
],
24+
"aRecords": [
25+
"40.112.243.18"
26+
],
27+
"alternateTxtRecords": [
28+
"7301B614D78FC456A5F1F9002CF1A31B6116D7AC5DEDC128C5DE6CCC90F3BE1C"
29+
]
30+
}
31+
}
32+
}
33+
}

0 commit comments

Comments
 (0)