swagger-api / swagger-api/swagger-codegen
[enhance] remove the suffix of supportingFiles template which is hardcode to .mustache
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 new templateEngine, but the suffix of the supportingFiles template is hardcoded to .mustache
in the function void io.swagger.codegen.v3.DefaultGenerator.generateSupportingFiles,
in line 635,
in jar: swagger-codegen-3.0.35-SNAPSHOT.jar
Swagger-codegen version
swagger-codegen-3.0.35-SNAPSHOT.jar
Suggest a fix/enhancement
adding a function in CodegenConfig to get the suffix of templates
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 DefaultGenerator.generateSupportingFiles, identified around line 635 in the swagger-codegen jar, and inspect how supportingFiles template names are resolved. Then review CodegenConfig for the proposed template-suffix hook. Done means the suffix is no longer fixed to .mustache and can be supplied by a template engine.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100