SwaggerHub can be used to define your API in JSON or YAML. The UI provided alongside shows the API vividly. The UI has the option to trigger a newly defined API and check the response as a model - the structure of JSON response body. If "example" has been given in the API specification, it's fetched in the response.
If this response model works as per requirement, it can be then used in WireMock to generate stubbed responses having canned data. A swagger specification fragment and response model shown below -
API specification -
"swagger": "2.0",
"info":{
"version":"v0.1",
"title":
"Capital city finder",
"description":"Search capital city by country name"
},
"definitions":{
"city":{
"properties":{
"countryName":{
"type":"string",
"example":"United Kingdom"
},
"capitalCity":{
"type":"string",
"example":"London"
},
"nationalAnimal":{
"type":"string",
"example":"Lion"
},
"popularFood":{
"type":"string",
"example":"Fish & Chips"
}
... ... ...
Response Model -
[
{
"countryName": "United Kingdom",
"capitalCity": "London",
"nationalAnimal": "Lion",
"popularFood": "Fish & Chips"
}
]
Not sure if this is still relevant to you now.