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

[swagger Model ] How to categorise models #6926

Open
sashank opened this issue Nov 10, 2017 · 5 comments
Open

[swagger Model ] How to categorise models #6926

sashank opened this issue Nov 10, 2017 · 5 comments

Comments

@sashank
Copy link

sashank commented Nov 10, 2017

This is more of a question.

I have around 20 model definitions in swagger.yaml and when i generate code its quite messy with all the models being in same directory. Is there a way to categorize them ?

Say i have models definitions for cats, chairs, dogs, tables, books, pens . How do i generate code that categorises into sub packages like below

models.animals
  cats, dogs
models.furniture
 tables,chairs
models.stationary
 books, pens 
@wing328
Copy link
Contributor

wing328 commented Nov 15, 2017

What about grouping different model into separate files and then generate models only (https://github.com/swagger-api/swagger-codegen#selective-generation)?

@sakp1711
Copy link

sakp1711 commented Dec 2, 2018

Any enhancement which supports this as of now?

@garyee
Copy link

garyee commented Oct 17, 2019

We do have more then 100. It would be great to have something like the 'tags' keyword for the models.

@CasperWSchmidt
Copy link

This goes for C# as well.

@JamalAbsalimov
Copy link

It would be nice to group models by type like this.
Example:
Response ->
TransactionResponse ->
StatusResponse
Request ->
TransactionRequest ->
StatusRequest

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

No branches or pull requests

7 participants