I am trying to define a API using OAS v2 that will return a payload along with some metadata.
In other words, the response to the API will be:
{
"metadata":[
{
"key" :"key1",
"value": "value1"
}
],
"payload": {Valid JSON}
}
The payload can be anything, and different for different scenarios, the only constraint being it will be a valid JSON format. So, at this point in time, I would like to define it just as a JSON object without defining the field level details.
How can I do that in OAS2/JSON schema?
Thanks in advance.