Skip to content

Commit

Permalink
Fix AAS Swagger Correctness v5 (Azure#12821)
Browse files Browse the repository at this point in the history
* fix correctness

* fix

* fix prettier

* add default value

* no message

* fix nit

* use error object

* Remove default
  • Loading branch information
david-msft authored and mkarmark committed Jul 20, 2021
1 parent 3b0a225 commit 1de4a07
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1153,9 +1153,8 @@
"description": "The status of the operation."
},
"error": {
"type": "object",
"description": "The error detail of the operation if any.",
"$ref": "#/definitions/ErrorResponse"
"$ref": "#/definitions/ErrorObject"
}
}
},
Expand Down Expand Up @@ -1260,46 +1259,50 @@
},
"description": "The resource management error additional info."
},
"ErrorObject": {
"type": "object",
"description": "The error object",
"properties": {
"code": {
"description": "Error code",
"type": "string"
},
"message": {
"description": "Error message indicating why the operation failed.",
"type": "string"
},
"subCode": {
"description": "The error sub code",
"type": "integer",
"format": "int32"
},
"httpStatusCode": {
"description": "The http status code",
"type": "integer",
"format": "int32"
},
"timeStamp": {
"description": "the timestamp for the error.",
"type": "string",
"readOnly": true
},
"details": {
"readOnly": true,
"type": "array",
"items": {
"$ref": "#/definitions/ErrorDetail"
},
"description": "The error details."
}
}
},
"ErrorResponse": {
"description": "Describes the format of Error response.",
"type": "object",
"properties": {
"error": {
"type": "object",
"description": "The error object",
"properties": {
"code": {
"description": "Error code",
"type": "string"
},
"message": {
"description": "Error message indicating why the operation failed.",
"type": "string"
},
"subCode": {
"description": "The error sub code",
"type": "integer",
"format": "int32"
},
"httpStatusCode": {
"description": "The http status code",
"type": "integer",
"format": "int32"
},
"timeStamp": {
"description": "the timestamp for the error.",
"type": "string",
"readOnly": true
},
"details": {
"readOnly": true,
"type": "array",
"items": {
"$ref": "#/definitions/ErrorDetail"
},
"description": "The error details."
}
}
"$ref": "#/definitions/ErrorObject"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1360,6 +1360,11 @@
"description": "The http status code",
"type": "integer",
"format": "int32"
},
"timeStamp": {
"description": "the timestamp for the error.",
"type": "string",
"readOnly": true
}
}
},
Expand Down Expand Up @@ -1426,7 +1431,7 @@
"error": {
"type": "object",
"description": "The error detail of the operation if any.",
"$ref": "#/definitions/ErrorResponse"
"$ref": "#/definitions/ErrorObject"
}
}
},
Expand Down Expand Up @@ -1521,46 +1526,50 @@
},
"description": "The resource management error additional info."
},
"ErrorObject": {
"type": "object",
"description": "The error object",
"properties": {
"code": {
"description": "Error code",
"type": "string"
},
"message": {
"description": "Error message indicating why the operation failed.",
"type": "string"
},
"subCode": {
"description": "The error sub code",
"type": "integer",
"format": "int32"
},
"httpStatusCode": {
"description": "The http status code",
"type": "integer",
"format": "int32"
},
"timeStamp": {
"description": "the timestamp for the error.",
"type": "string",
"readOnly": true
},
"details": {
"readOnly": true,
"type": "array",
"items": {
"$ref": "#/definitions/ErrorDetail"
},
"description": "The error details."
}
}
},
"ErrorResponse": {
"description": "Describes the format of Error response.",
"type": "object",
"properties": {
"error": {
"type": "object",
"description": "The error object",
"properties": {
"code": {
"description": "Error code",
"type": "string"
},
"message": {
"description": "Error message indicating why the operation failed.",
"type": "string"
},
"subCode": {
"description": "The error sub code",
"type": "integer",
"format": "int32"
},
"httpStatusCode": {
"description": "The http status code",
"type": "integer",
"format": "int32"
},
"timeStamp": {
"description": "the timestamp for the error.",
"type": "string",
"readOnly": true
},
"details": {
"readOnly": true,
"type": "array",
"items": {
"$ref": "#/definitions/ErrorDetail"
},
"description": "The error details."
}
}
"$ref": "#/definitions/ErrorObject"
}
}
}
Expand Down

0 comments on commit 1de4a07

Please sign in to comment.