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

Add support for shared models #58

Closed
jwyuen opened this issue May 21, 2014 · 3 comments
Closed

Add support for shared models #58

jwyuen opened this issue May 21, 2014 · 3 comments

Comments

@jwyuen
Copy link

jwyuen commented May 21, 2014

Basically #2 in this link:

swagger-api/swagger-js#35 (comment)

This would help keep api docs DRY.

@mission-liao
Copy link
Contributor

+1, I think it would be a better choice of spec-design.

@webron
Copy link
Member

webron commented Jul 29, 2014

Swagger 2.0 is going to have a slightly different file structure. Since everything could be represented in a single file, it would eliminate the need for repeated model definitions.

fehguy added a commit that referenced this issue Sep 8, 2014
@webron
Copy link
Member

webron commented Sep 19, 2014

This indeed has been resolved in Swagger 2.0. The specification is now theoretically a single file so all the models are defined in a single place. Furthermore, you can $ref to an external file and share models across swagger endpoints.

@webron webron closed this as completed Sep 19, 2014
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

3 participants