swagger-api / swagger-api/swagger-codegen

[enhance] remove the suffix of supportingFiles template which is hardcode to .mustache

Open
#11,836 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.