swagger-ui
swagger-ui copied to clipboard
Response Class - array of object - Model not showing
Was working previously. Reproduce - swagger-ui demo, expand GET /pet/findByStatus, click on Model under Response Class.
Shows array{} and not the object definition.
This might be related to a bug I am seeing as well. It seems that models can only be rendered a single level deep at the moment.
This JSON:
// attached to swagger object
"definitions": {
"media_get_media_id": {
"type": "object",
"required": [],
"properties": {
"name": {
"type": "string"
},
"src": {
"type": "string"
},
"media_file": {
"properties": {
"file_type": {
"type": "string"
},
"base64": {
"type": "string"
}
},
"type": "object"
}
}
}
}
...renders in the UI "Model Schema" as this:
{
"name": "string",
"src": "string",
"media_file": {}
}
Please follow this issue here https://github.com/swagger-api/swagger-js/issues/270