The following solution will only work with Swagger 2.0.
Define the model as described below:
{
"type": "object",
"properties": {
"message": {
"type": "string"
},
"attributes": {
"type": "object",
"additionalProperties": {}
}
}
}
It describes it attributesas a property map, where the value can be anything (a string, number, array, or even an object).
source
share