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

Bad generation of JSON Schema when multiple instances of a same object in the the response. #269

Closed
brunoroussel opened this issue Jul 24, 2013 · 3 comments

Comments

@brunoroussel
Copy link

Hello,

In swagger-ui (develop 2.0), there is an issue in the model schema panel:
JSON schema is not properly generated when there are multiple instances of a same object in the the response.

Exemple :
2 ressources :
People( String name, String surname)
Movie (People director, People mainActor).

Here is what I have in swagger-ui for the movie resource :

{
director:{name:string, surname:string},
mainActor:People
}

Here is what I expect :

{
director:{name:string, surname:string},
mainActor:{name:string, surname:string}
}

@rage-shadowman
Copy link

See issue #264. I have already submitted a pull request containing the fix to the upstream swagger-js project but they have yet to merge it.

This is a 1 line fix if you care to do it manually to your own local copy.

@brunoroussel
Copy link
Author

Great.
I actually searched for before posting but I didn't find anything related.
thanks for the fix.
I close it.

@rage-shadowman
Copy link

See issue #245 (apparently 264 was also a duplicate)

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