swagger-api / swagger-api/swagger-codegen
How to reuse existing language support?
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
I want to add a bunch of "support" files to existing language. What should I do to copy existing generator+template combo to be able to customize it.
(I would like to work on a copy so that future swagger-codegen changes do not break them. I think I need to modify generator as well to add lines declaring new "support" files.)
I've tried to follow this to create custom code gen:
https://github.com/swagger-api/swagger-codegen#making-your-own-codegen-modules
However I'm unable to copy existing codegen&templates (from modules/swagger-codegen/src/main/resources/*), to folder of newly created codegen module, compile it and then make it visible to swagger-codegen.
PS. swagger-codegen help meta do claim that generator will be generated accordingly to specified language, but it show no option/parameter to specify it.
Swagger-codegen version
2.2.3
Suggest a fix/enhancement
Add documentation showing how to create custom codegen module starting from existing generator&template combo.
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
Start with the repository's “Making your own codegen modules” guidance and the contents of modules/swagger-codegen/src/main/resources/*. Reproduce the reported custom-module setup and check the help meta behavior described in the issue. Done means documenting how to reuse and customize an existing generator and templates, including how the resulting module is compiled and made visible.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation, tooling
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100