DapperDox / dapperdox

Beautiful, integrated, OpenAPI documentation.
http://dapperdox.io
GNU General Public License v3.0
409 stars 59 forks source link

Response resources which are arrays don't indicate as such #79

Closed JustASquid closed 6 years ago

JustASquid commented 7 years ago

Check out this part of the petstore example spec for operation findPetsByStatus:

 "responses": {
                    "200": {
                        "description": "successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/Pet"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid status value"
                    }
                },

Obviously this response returns an array of pets on success. However, in DapperDox itself, it simply shows that it will return Pet:

Returns Pet

This is pretty confusing in my opinion. DapperDox should show that an array of resources is being returned here.

zxchris commented 6 years ago

This is fixed in the latest release v1.2.1, and on the master branch.

Response resources are suffixed with [] if an array of resources is returned. A request body that takes an array resources is now correctly described.