sius / swagger-nodegen-cli

A convenience node package to make the swagger-codegen-cli.jar availabe in the node/npm environment
Apache License 2.0
12 stars 5 forks source link

ModuleWithProviders requires 1 type argument with Angular 10 #8

Closed stbnvll93 closed 3 years ago

stbnvll93 commented 4 years ago

Hi,

I use swagger-nodegen-cli to generate some services defined by Swagger 2.0 in my Angular frontend. Since the update to Angular 10 the generated ApiModule needs a type argument, otherwise the following error appears when compiling: "Generic type 'ModuleWithProviders' requires 1 type argument(s)." Can this problem be solved by configuration?

Thanks for your help.

sius commented 4 years ago

Unfortunately not, swagger-nodegen-cli only wraps the java library swagger-codegen-cli.jar. Maybe a newer version of this library fixes the problem. Currently version 3.0.19 is used. To display the detailed config options use: sc config-help -l typescript-angular

dolanmiu commented 3 years ago

@sius Could you push an update soon?

Swagger codegen cli has fixed the issue:

https://github.com/swagger-api/swagger-codegen/issues/10417

dolanmiu commented 3 years ago

@sius @stbnvll

I have made a PR to fix this issue:

https://github.com/sius/swagger-nodegen-cli/pull/11