We have a response type "Error" that may contain a field "extraInfo".
Error:
type: object
properties:
code:
type: string
message:
type: string
extraInfo:
description: any complementary information
type: object
// how to provide examples here?
One example for it can be :
"extraInfo": {
"doors": {
"frontLeftClosed": false,
"frontRightClosed": true,
"rearLeftClosed": true,
"rearRightClosed": true,
"trunkClosed": true
},
"windows": {
"frontLeftClosed": false,
"rearLeftClosed": true,
"trunkClosed": false
}
}
another could be :
"extraInfo": {
"transactionId": "77812783001"
}
Since it s a free form object, is there a way to provide examples for it in Swagger?
Couldn't find it in the spec : https://swagger.io/docs/specification/data-models/data-types/