Search code examples
swaggerswagger-uiswagger-2.0swagger-editor

Array title not showing up in Swagger UI Models


I have a Response object and an array of Response objects with "title": "Responses". But Responses title text is not showing up in Models section of Swagger UI. Is this expected or something wrong with my swagger definition ? I am using the master branch from https://github.com/swagger-api/swagger-ui

Swagger definition section:

    "Response": {
                "type": "object",
                "title": "Response",
                "description": "Response to query.",
                "properties": {
                    "Query": {
                        "$ref": "#/definitions/Query"
                    },
                    "Result": {
                        "$ref": "#/definitions/Result"
                    }
                }
            },
   "Responses": {
                "type": "array",
                "title": "Responses",
                "description": "Array of responses.",
                "items": {
                    "$ref": "#/definitions/Response"
                }
            }

Swagger UI Model


Solution

  • This appears to be an issue with Swagger UI 3.x. I have a similar API definition. It works fine in Swagger UI 2.x, but I see the same issue in 3.x. I don't know if the Swagger UI team is tracking the issue yet.

    If you can't wait for a fix, you might want to use the latest distribution from the 2.x branch.