Skip to content

Commit

Permalink
Merge pull request swagger-api#10464 from derkoe/fix/typescript-angul…
Browse files Browse the repository at this point in the history
…ar-10

Fix code generation for Angular 10
  • Loading branch information
HugoMario committed Oct 15, 2020
2 parents d819162 + f5783b0 commit 755481e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public void processOpts() {
additionalProperties.put("injectionTokenTyped", ngVersion.atLeast("4.0.0"));
additionalProperties.put("useHttpClient", ngVersion.atLeast("4.3.0"));
additionalProperties.put("useRxJS6", ngVersion.atLeast("6.0.0"));
additionalProperties.put("genericModuleWithProviders", ngVersion.atLeast("7.0.0"));
if (!ngVersion.atLeast("4.3.0")) {
supportingFiles.add(new SupportingFile("rxjs-operators.mustache", getIndexDirectory(), "rxjs-operators.ts"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { {{classname}} } from './{{importPath}}';
{{/hasMore}}{{/apis}}{{/apiInfo}} ]
})
export class ApiModule {
public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders {
public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders{{#genericModuleWithProviders}}<ApiModule>{{/genericModuleWithProviders}} {
return {
ngModule: ApiModule,
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
Expand Down

0 comments on commit 755481e

Please sign in to comment.