title: How do I use swagger-codegen cli with custom template?
body: <p>I would like to add a few tweaks to the <a href="https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen/src/main/resources/typescript-fetch" rel="nofollow noreferrer">typescript-fetch template</a>.</p>
  <p>I have downloaded the typescript-fetch folder linked above and stored it in <code>.\template</code> folder in my project. I assumed that all I would have to do is pass <code>--template-dir .\template</code> to the CLI as follows:</p>
  <pre><code>&gt;Java -jar .\bin\swagger-codegen-cli.jar generate -l typescript-fetch -i https://localhost:7113/swagger/v1/swagger.json -o output -Dio.swagger.v3.parser.util.RemoteUrl.trustAll=true --template-dir .\template
  </code></pre>
  <p>but getting the following exception:</p>
  <pre><code>07:55:44.212 [Thread-1] INFO  i.s.codegen.v3.AbstractGenerator - writing file c:\projects\trustwell-api-client-ts\output\index.ts
  Exception in thread &quot;Thread-1&quot; java.lang.RuntimeException: Could not generate supporting file 'SupportingFile:
          templateFile: api.mustache
          folder:
          destinationFilename: api.ts
  '
          at io.swagger.codegen.v3.DefaultGenerator.generateSupportingFiles(DefaultGenerator.java:666)
          at io.swagger.codegen.v3.DefaultGenerator.generate(DefaultGenerator.java:789)
          at io.swagger.codegen.v3.cli.cmd.Generate.run(Generate.java:388)
          at java.lang.Thread.run(Unknown Source)
  Caused by: com.github.jknack.handlebars.HandlebarsException: c:\projects\trustwell-api-client-ts\.\template\api.mustache:142:73: found: '-last', expected: 'no viable alternative at input '{{^-last''
                                          ? configuration.accessToken(&quot;{{name}}&quot;, [{{#scopes}}&quot;{{{scope}}}&quot;{{^-last}}, {{/-last}}{{/scopes}}])
                                                                           ^
          at com.github.jknack.handlebars.internal.HbsErrorReporter.syntaxError(HbsErrorReporter.java:93)
          at com.github.jknack.handlebars.internal.antlr.ProxyErrorListener.syntaxError(ProxyErrorListener.java:41)
          at com.github.jknack.handlebars.internal.antlr.Parser.notifyErrorListeners(Parser.java:544)
  ...
  </code></pre>
  <p>It seems that CLI is picking up my folder, but I'm not sure if there is anything else I need to do to make this work.</p>
  <p><strong>Question:</strong> how can I run swagger-codegen CLI with local mustache templates?</p>