swagger-api / swagger-api/swagger-codegen-generators

[typescript-angular] failed to generate tagged unions

Open
#794 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
299
Forks
439
PR merge metrics
No merged PRs in 30d

Description

ATM using [typescript-angular] with taggedUnions options enabled the code generation fails with an exception.

...
Caused by: com.github.jknack.handlebars.HandlebarsException: /handlebars/typescript-angular/modelGenericEnums.mustache:1:3: java.lang.ClassCastException: java.lang.String cannot be cast to io.swagger.codegen.v3.VendorExtendable
   /handlebars/typescript-angular/modelGenericEnums.mustache:1:3
...

You can find a complete description in the source issue swagger-api/swagger-codegen#10528.

As already mentioned in the other issue, I would like to provide fix for this. Please let me know if you would accept one

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with handlebars/typescript-angular/modelGenericEnums.mustache and reproduce generation with taggedUnions enabled. Read the referenced swagger-api/swagger-codegen#10528 issue for the complete context; done means tagged-union generation completes without the reported ClassCastException.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.