swagger-api / swagger-api/swagger-codegen
[swagger Model ] How to categorise models
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names swagger.yaml and generated model output but no implementation files or tests. Start by checking how the generator maps model definitions to packages, then determine whether grouping models into subpackages is supported for the relevant target language. Done should mean a defined way to generate categories such as animals, furniture, and stationery.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100