mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 10:58:55 +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:
parent
57b42a544d
commit
8a0de971e4
@ -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}}
|
@ -1,3 +1,4 @@
|
||||
|
||||
// RxJS imports according to https://angular.io/docs/ts/latest/guide/server-communication.html#!#rxjs
|
||||
|
||||
// See node_module/rxjs/Rxjs.js
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
// RxJS imports according to https://angular.io/docs/ts/latest/guide/server-communication.html#!#rxjs
|
||||
|
||||
// See node_module/rxjs/Rxjs.js
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
// RxJS imports according to https://angular.io/docs/ts/latest/guide/server-communication.html#!#rxjs
|
||||
|
||||
// See node_module/rxjs/Rxjs.js
|
||||
|
@ -17,7 +17,6 @@ import { HttpClient, HttpHeaders, HttpParams,
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import '../rxjs-operators';
|
||||
|
||||
import { ApiResponse } from '../model/apiResponse';
|
||||
import { Pet } from '../model/pet';
|
||||
|
@ -17,7 +17,6 @@ import { HttpClient, HttpHeaders, HttpParams,
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import '../rxjs-operators';
|
||||
|
||||
import { Order } from '../model/order';
|
||||
|
||||
|
@ -17,7 +17,6 @@ import { HttpClient, HttpHeaders, HttpParams,
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import '../rxjs-operators';
|
||||
|
||||
import { User } from '../model/user';
|
||||
|
||||
|
@ -1,11 +1,2 @@
|
||||
// RxJS imports according to https://angular.io/docs/ts/latest/guide/server-communication.html#!#rxjs
|
||||
// RxJS imports are not needed for Angular 4.3 and later
|
||||
|
||||
// See node_module/rxjs/Rxjs.js
|
||||
// Import just the rxjs statics and operators we need for THIS app.
|
||||
|
||||
// Statics
|
||||
import 'rxjs/add/observable/throw';
|
||||
|
||||
// Operators
|
||||
import 'rxjs/add/operator/catch';
|
||||
import 'rxjs/add/operator/map';
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
// RxJS imports according to https://angular.io/docs/ts/latest/guide/server-communication.html#!#rxjs
|
||||
|
||||
// See node_module/rxjs/Rxjs.js
|
||||
|
Loading…
Reference in New Issue
Block a user