Swagger-codegen: [swagger Model ] How to categorise models

Created on 10 Nov 2017  路  4Comments  路  Source: swagger-api/swagger-codegen

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 
Question java

Most helpful comment

Any enhancement which supports this as of now?

All 4 comments

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

Any enhancement which supports this as of now?

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

This goes for C# as well.

Was this page helpful?
0 / 5 - 0 ratings