swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

Add switch to enable template rendering via handlebars

Open tgmuender opened this issue 8 years ago • 3 comments

PR checklist

  • [ ] Read the contribution guidelines.
  • [ ] Ran the shell/batch script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)
  • [ ] Filed the PR against the correct branch: master for non-breaking changes and 2.3.0 branch for breaking (non-backward compatible) changes.

Description of the PR

(details of the change, additional tests that have been done, reference to the issue for tracking, etc)

tgmuender avatar Apr 11 '17 10:04 tgmuender

Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/swagger-api/swagger-codegen/graphs/contributors.

Let me know if you need help fixing it.

Ref: https://github.com/swagger-api/swagger-codegen/wiki/FAQ#how-can-i-update-commits-that-are-not-linked-to-my-github-account

wing328 avatar Apr 11 '17 11:04 wing328

Can you please also elaborate on what this PR does? Is there an issue/ticket opened for this?

wing328 avatar Apr 11 '17 11:04 wing328

Wow, thanks for the quick reply.

Thanks for the hint with the contributions, I have updated my email addresses to include the one I used in the commit.

I did not create separate ticket, but the closest ticket is this one: https://github.com/swagger-api/swagger-codegen/issues/3950 (discussion about different template engines)

The pull request allows to use the handlebars template engine by additionally setting the system property "'Dhandlebars", e.g.

java -Dmodels -Dhandlebars -cp swagger-codegen-cli.jar io.swagger.codegen.SwaggerCodegen generate
-l java
-t handlebarsTemplateLocation

If the "-Dhandlebars" system property is not present, everything will be rendered with the Mustache engine.

Thanks and best regards, Tobias

2017-04-11 13:07 GMT+02:00 wing328 [email protected]:

Can you please also elaborate on what this PR does? Is there an issue/ticket opened for this?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/swagger-api/swagger-codegen/pull/5365#issuecomment-293224600, or mute the thread https://github.com/notifications/unsubscribe-auth/ACQPpwvLVq9eqWxbIpVqCQsMbChVuS-sks5ru17mgaJpZM4M57S_ .

tgmuender avatar Apr 11 '17 11:04 tgmuender