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

[typescript-inversify] generates unusable code #9785

Closed
michalzubkowicz opened this issue Oct 16, 2019 · 1 comment
Closed

[typescript-inversify] generates unusable code #9785

michalzubkowicz opened this issue Oct 16, 2019 · 1 comment

Comments

@michalzubkowicz
Copy link
Contributor

michalzubkowicz commented Oct 16, 2019

Description

typescript-inversify generates unusable code, with TypeScript warnings, also services are injected in a way that doesn't work with current version of inversify:
inversify/InversifyJS#1004 (comment)

Swagger-codegen version

2.4.9

Command line used for generation

swagger-codegen-cli.jar -l typescript-inversify

Suggest a fix/enhancement
  1. Move DI classses from contructor to properties (api.service.mustache)
  2. Replace type casting from <> to "as" (TS recommend that)
  3. Replace == with ===
  4. Remove redundant local variable basePath.
  5. fix quotemarks
michalzubkowicz added a commit to michalzubkowicz/swagger-codegen that referenced this issue Oct 16, 2019
Moved DI classses from contructor to properties (api.service.mustache)
Removed type casting when not needed (TS showed warning about that)
Replaced == with ===
Removed redundant local variable basePath.
fixed quotemarks
michalzubkowicz added a commit to michalzubkowicz/swagger-codegen that referenced this issue Oct 16, 2019
@michalzubkowicz michalzubkowicz mentioned this issue Oct 16, 2019
@HugoMario
Copy link
Contributor

covered by #9786 , so closing. thanks again @michalzubkowicz for your help.

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

No branches or pull requests

2 participants