swagger-ui icon indicating copy to clipboard operation
swagger-ui copied to clipboard

Response Class - array of object - Model not showing

Open rmullinnix opened this issue 11 years ago • 2 comments

Was working previously. Reproduce - swagger-ui demo, expand GET /pet/findByStatus, click on Model under Response Class.

Shows array{} and not the object definition.

rmullinnix avatar Feb 27 '15 20:02 rmullinnix

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": {}
}

Smolations avatar Mar 03 '15 07:03 Smolations

Please follow this issue here https://github.com/swagger-api/swagger-js/issues/270

mohsen1 avatar Mar 16 '15 21:03 mohsen1