Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested definitions not showing on *Response Messages* area #1567

Closed
yoanisgil opened this issue Aug 26, 2015 · 4 comments
Closed

Nested definitions not showing on *Response Messages* area #1567

yoanisgil opened this issue Aug 26, 2015 · 4 comments

Comments

@yoanisgil
Copy link

I have an API specification where response definitions are nested:

https://gist.githubusercontent.com/yoanisgil/4f682a2fff099f4088a2/raw/55ca4513dba6fb20c5d31f071c32aaedf6bc71ba/api.json

however the response models are not shown in the Response Messages area
screenshot from 2015-08-26 15-13-34

Is this a bug or is it just the way that is supposed to work?

@webron
Copy link
Contributor

webron commented Aug 27, 2015

You mean inline definitions?

@yoanisgil
Copy link
Author

I am new to swagger but I am talking about the column Response Model under the section Response Messages. If I define an array of items like this:

"responses": {
     "400": {
            "description": "Validation error",
            "schema": {
                 "properties": {
                     "errors": {
                     "type": "array",
                     "items": {
                         "$ref": "#/definitions/DomainCreationError"
                    }
         }
     }
}

that won't display under the Response Messages section. If I switch to "200" then it will properly display on Response Class (Status 200). And if I use a flat schema, i.e no nested properties, no array, etc it will display fine under Response Messages.

I think one easy way to test is just to modify my sample api.json and swap 400 and 200 responses. That should explain the issue.

@webron
Copy link
Contributor

webron commented Aug 28, 2015

Yup, that's an inline definition and a duplicate of #1297 - please follow that issue.

@webron webron closed this as completed Aug 28, 2015
@yoanisgil
Copy link
Author

Cool. Thanks for the follow up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants