ARM Error
ARM OpenAPI(swagger) specs
The default error response schema SHOULD correspond to the schema documented at https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-details.md#error-response-content.
The default error response schema SHOULD correspond to the schema documented at common-api-details.
April 2, 2020
April 2, 2020
Following the ARM specification to modify the schema in the swagger file. It's recommended to refer to the 'ErrorResponse' in v2/types.json which is provided for fixing the error.
The following would be invalid:
"definitions": {
"ErrorResponse": {
"properties": {
"code": {
"readOnly": true,
"type": "string",
"description": "The error code."
},
"message": {
"readOnly": true,
"type": "string",
"description": "The error message."
}
...
}
}
}
the correct schema:
"definitions": {
"ErrorResponse": {
"properties": {
"error": {
"type": "object",
"description": "The error object.",
"properties": {
"code": {
"readOnly": true,
"type": "string",
"description": "The error code."
},
"message": {
"readOnly": true,
"type": "string",
"description": "The error message."
}
...
}
}
}
}