swagger-api / swagger-api/swagger-codegen
open api 3 hard coded template directory to handlebars even when using mustache
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
We have been trying to migrate our custom code generation sbt plugin from swagger 2 to open-api 3 and having difficulties.
swagger codegen 3.0.46 and codegen-generators 1.0.42:
"io.swagger.codegen.v3" % "swagger-codegen" % "3.0.46",
"io.swagger.codegen.v3" % "swagger-codegen-generators" % "1.0.42",
We are using mustache templates in a resource folder scala2
We are unable to get the generator to look in this folder and also by default it always prefixes it with "handlebars"
It is confusing when we are using mustache and not handlebars to have to put our templates in a folder called handlebars.
We are extending io.swagger.codegen.v3.generators.scala.AbstractScalaCodegen and io.swagger.codegen.v3.generators.DefaultCodegenConfig for two different code generators and both suffer from the same problem generating scala and proto v2 files.
We read through another thread which says this is fixed and but are unable to figure out the right thing to do.
Any advice would be appreciated.
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 by tracing template-directory handling from io.swagger.codegen.v3.generators.scala.AbstractScalaCodegen and io.swagger.codegen.v3.generators.DefaultCodegenConfig. Reproduce the issue with the custom Scala and proto v2 generators and their mustache resource folder; done means templates are located without an inappropriate handlebars prefix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100