Skip to content
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

HandlebarsException in kotlin-client (swagger 3.0.0-rc1) #8300

Closed
kroegerama opened this issue Jun 9, 2018 · 3 comments · Fixed by swagger-api/swagger-codegen-generators#93

Comments

@kroegerama
Copy link

kroegerama commented Jun 9, 2018

I'm getting the following error when I try to generate a kotlin-client with v3.0.0-rc1:

Exception in thread "Thread-1" java.lang.RuntimeException: Could not generate model 'body'
        at io.swagger.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:409)
        at io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:728)
        at io.swagger.codegen.cmd.Generate.run(Generate.java:331)
        at java.lang.Thread.run(Unknown Source)
Caused by: com.github.jknack.handlebars.HandlebarsException: /v2/kotlin-client/class_doc.mustache:6:133: found: '}}}', expected: '}}'
{{#vars}}**{{name}}** | {{#is this 'enum'}}[**inline**](#{{datatypeWithEnum}}){{/is}}{{#isNot this 'enum'}}{{#is this 'primitiveType'}}}**{{datatype}}**{{/is}}}{{#isNot this 'primitiveType'}}[**{{datatype}}**](
{{complexType}}.md){{/is}}}{{/is}} | {{description}} | {{^required}} [optional]{{/required}}{{#readOnly}} [readonly]{{/readOnly}}

The same file works fine with swagger 2

@kroegerama kroegerama changed the title HandlebarsException in kotlin-client HandlebarsException in kotlin-client (swagger 3.0.0-rc1) Jun 9, 2018
@HugoMario
Copy link
Contributor

Hey @kroegerama, this was fixed for 3.0.0-SNAPSHOT, when you have a chance, can you please check if this issue is still present?

@kroegerama
Copy link
Author

kroegerama commented Jun 10, 2018

@HugoMario the issue is still present in swagger-codegen-cli-3.0.0-20180608.091024-78.jar

Edit: Sorry, my snapshot is way to old to contain your fix. I will test as soon as a I can download the latest snapshot.

@kroegerama
Copy link
Author

@HugoMario The problem seems to be fixed, thank you. However, now I'm having the following issue: #8324

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants