mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 06:42:45 +00:00
Remove rxjs operators (#6989)
* do not import rxjs-operators if using HttpClinet * generate code * do not import operators if they are not needed
This commit is contained in:
@@ -15,7 +15,9 @@ import { CustomQueryEncoderHelper } from '../encoder';
|
||||
{{/useHttpClient}}
|
||||
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
{{^useHttpClient}}
|
||||
import '../rxjs-operators';
|
||||
{{/useHttpClient}}
|
||||
|
||||
{{#imports}}
|
||||
import { {{classname}} } from '../{{filename}}';
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
{{#useHttpClient}}
|
||||
// RxJS imports are not needed for Angular 4.3 and later
|
||||
{{/useHttpClient}}
|
||||
|
||||
{{^useHttpClient}}
|
||||
// RxJS imports according to https://angular.io/docs/ts/latest/guide/server-communication.html#!#rxjs
|
||||
|
||||
// See node_module/rxjs/Rxjs.js
|
||||
@@ -9,3 +14,4 @@ import 'rxjs/add/observable/throw';
|
||||
// Operators
|
||||
import 'rxjs/add/operator/catch';
|
||||
import 'rxjs/add/operator/map';
|
||||
{{/useHttpClient}}
|
||||
Reference in New Issue
Block a user