-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swagger-codegen-cli-3.0.2 customizing html mustache templates #8964
Comments
hello @navaneethaKolichelma i already added a PR fixing this issue, can you please verify when you have a chance? Going to close it for now, but we can open it if you find something wrong. |
Hi @HugoMario I have tried with latest swagger-codegen-cli-3.0.3.jar still facing the issue java -jar swagger-codegen-cli-3.0.3.jar generate -i swagger.json -l html -t htmlDocs --template-version handlebars Exception in thread "Thread-1" java.lang.RuntimeException: Could not generate supporting file 'SupportingFile: java -jar swagger-codegen-cli-3.0.3.jar generate -i swagger.json -l html -t htmlDocs/ --template-version 1.0.0 --template-engine mustache This worked but no change in HTML output |
@navaneethaKolichelma |
Handlebars and Mustache templates are working fine. Thank you for your support |
Description
Am new to swagger codegen and I have downloaded swagger-codegen-cli-3.0.2.jar and would like to customize the html output using customized mustache templates and downloaded the templates from swagger-codegen-generators
I have tried customizing the mustache template for swagger-codegen 2.3.1 and this worked.
Swagger-codegen version
swagger-codegen-cli-3.0.2
Swagger declaration file content or url
Command line used for generation
java -jar swagger-codegen-cli-3.0.2.jar generate -i swagger.json -l html -o . -t htmlDocs --template-engine 'mustache'
Steps to reproduce
java -jar swagger-codegen-cli-3.0.2.jar generate -i swagger.json -l html -o . -t htmlDocs --template-engine 'handlebars'
Build is not success
Exception in thread "Thread-1" java.lang.RuntimeException: Could not generate supporting file 'SupportingFile:
templateFile: index.mustache
folder:
destinationFilename: index.html
When i execute without custom templates
java -jar swagger-codegen-cli-3.0.2.jar generate -i swagger.json -l html -o .
Build is successful and I can applying the defaault templates
13:45:12.679 [Thread-1] DEBUG com.github.jknack.handlebars.internal.HbsParserFactory - Building AST
13:45:12.724 [Thread-1] DEBUG com.github.jknack.handlebars.internal.HbsParserFactory - Applying Mustache spec
13:45:12.730 [Thread-1] DEBUG com.github.jknack.handlebars.internal.HbsParserFactory - Creating templates
13:45:12.767 [Thread-1] DEBUG com.github.jknack.handlebars.internal.HbsParserFactory - About to parse: /handlebars/htmlDocs/style.css.mustache
But when I have executed as
java -jar swagger-codegen-cli-3.0.2.jar generate -i swagger.json -l html -o . -t htmlDocs --template-engine 'mustache'
Build is successful but The generated html is not as per customized mustache files
Related issues/PRs
Suggest a fix/enhancement
Please let me know if I am missing anything or how to use customized mustache or handlebars
The text was updated successfully, but these errors were encountered: