forked from loafle/openapi-generator-original
Merge pull request #2771 from taxpon/issue-2770
Update typescript-angular2 client to adapt to rc (#2770)
This commit is contained in:
commit
f60bffe484
@ -1,7 +1,8 @@
|
||||
import {Http, Headers, RequestOptionsArgs, Response, URLSearchParams} from 'angular2/http';
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {Http, Headers, RequestOptionsArgs, Response, URLSearchParams} from '@angular/http';
|
||||
import {Injectable, Optional} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import * as models from '../model/models';
|
||||
import 'rxjs/Rx';
|
||||
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
@ -18,7 +19,7 @@ export class {{classname}} {
|
||||
protected basePath = '{{basePath}}';
|
||||
public defaultHeaders : Headers = new Headers();
|
||||
|
||||
constructor(protected http: Http, basePath: string) {
|
||||
constructor(protected http: Http, @Optional() basePath: string) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
|
@ -16,17 +16,30 @@
|
||||
"build": "typings install && tsc"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"angular2": "^2.0.0-beta.15",
|
||||
"rxjs": "^5.0.0-beta.2"
|
||||
"@angular/common": "^2.0.0-rc.1",
|
||||
"@angular/compiler": "^2.0.0-rc.1",
|
||||
"@angular/core": "^2.0.0-rc.1",
|
||||
"@angular/http": "^2.0.0-rc.1",
|
||||
"@angular/platform-browser": "^2.0.0-rc.1",
|
||||
"@angular/platform-browser-dynamic": "^2.0.0-rc.1",
|
||||
"core-js": "^2.3.0",
|
||||
"rxjs": "^5.0.0-beta.6",
|
||||
"zone.js": "^0.6.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/common": "^2.0.0-rc.1",
|
||||
"@angular/compiler": "^2.0.0-rc.1",
|
||||
"@angular/core": "^2.0.0-rc.1",
|
||||
"@angular/http": "^2.0.0-rc.1",
|
||||
"@angular/platform-browser": "^2.0.0-rc.1",
|
||||
"@angular/platform-browser-dynamic": "^2.0.0-rc.1",
|
||||
"core-js": "^2.3.0",
|
||||
"rxjs": "^5.0.0-beta.6",
|
||||
"zone.js": "^0.6.12",
|
||||
"typescript": "^1.8.10",
|
||||
"typings": "^0.8.1",
|
||||
"angular2": "^2.0.0-beta.15",
|
||||
"es6-shim": "^0.35.0",
|
||||
"es7-reflect-metadata": "^1.6.0",
|
||||
"rxjs": "5.0.0-beta.2",
|
||||
"zone.js": "^0.6.10"
|
||||
"es7-reflect-metadata": "^1.6.0"
|
||||
}{{#npmRepository}},
|
||||
"publishConfig":{
|
||||
"registry":"{{npmRepository}}"
|
||||
|
@ -1,7 +1,8 @@
|
||||
import {Http, Headers, RequestOptionsArgs, Response, URLSearchParams} from 'angular2/http';
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {Http, Headers, RequestOptionsArgs, Response, URLSearchParams} from '@angular/http';
|
||||
import {Injectable, Optional} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import * as models from '../model/models';
|
||||
import 'rxjs/Rx';
|
||||
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
@ -12,7 +13,7 @@ export class PetApi {
|
||||
protected basePath = 'http://petstore.swagger.io/v2';
|
||||
public defaultHeaders : Headers = new Headers();
|
||||
|
||||
constructor(protected http: Http, basePath: string) {
|
||||
constructor(protected http: Http, @Optional() basePath: string) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
import {Http, Headers, RequestOptionsArgs, Response, URLSearchParams} from 'angular2/http';
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {Http, Headers, RequestOptionsArgs, Response, URLSearchParams} from '@angular/http';
|
||||
import {Injectable, Optional} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import * as models from '../model/models';
|
||||
import 'rxjs/Rx';
|
||||
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
@ -12,7 +13,7 @@ export class StoreApi {
|
||||
protected basePath = 'http://petstore.swagger.io/v2';
|
||||
public defaultHeaders : Headers = new Headers();
|
||||
|
||||
constructor(protected http: Http, basePath: string) {
|
||||
constructor(protected http: Http, @Optional() basePath: string) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
import {Http, Headers, RequestOptionsArgs, Response, URLSearchParams} from 'angular2/http';
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {Http, Headers, RequestOptionsArgs, Response, URLSearchParams} from '@angular/http';
|
||||
import {Injectable, Optional} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import * as models from '../model/models';
|
||||
import 'rxjs/Rx';
|
||||
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
@ -12,7 +13,7 @@ export class UserApi {
|
||||
protected basePath = 'http://petstore.swagger.io/v2';
|
||||
public defaultHeaders : Headers = new Headers();
|
||||
|
||||
constructor(protected http: Http, basePath: string) {
|
||||
constructor(protected http: Http, @Optional() basePath: string) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201604282253
|
||||
## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201605120027
|
||||
|
||||
### Building
|
||||
|
||||
@ -19,7 +19,7 @@ navigate to the folder of your consuming project and run one of next commando's.
|
||||
_published:_
|
||||
|
||||
```
|
||||
npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201604282253 --save
|
||||
npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201605120027 --save
|
||||
```
|
||||
|
||||
_unPublished (not recommended):_
|
||||
|
@ -1,7 +1,8 @@
|
||||
import {Http, Headers, RequestOptionsArgs, Response, URLSearchParams} from 'angular2/http';
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {Http, Headers, RequestOptionsArgs, Response, URLSearchParams} from '@angular/http';
|
||||
import {Injectable, Optional} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import * as models from '../model/models';
|
||||
import 'rxjs/Rx';
|
||||
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
@ -12,7 +13,7 @@ export class PetApi {
|
||||
protected basePath = 'http://petstore.swagger.io/v2';
|
||||
public defaultHeaders : Headers = new Headers();
|
||||
|
||||
constructor(protected http: Http, basePath: string) {
|
||||
constructor(protected http: Http, @Optional() basePath: string) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
import {Http, Headers, RequestOptionsArgs, Response, URLSearchParams} from 'angular2/http';
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {Http, Headers, RequestOptionsArgs, Response, URLSearchParams} from '@angular/http';
|
||||
import {Injectable, Optional} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import * as models from '../model/models';
|
||||
import 'rxjs/Rx';
|
||||
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
@ -12,7 +13,7 @@ export class StoreApi {
|
||||
protected basePath = 'http://petstore.swagger.io/v2';
|
||||
public defaultHeaders : Headers = new Headers();
|
||||
|
||||
constructor(protected http: Http, basePath: string) {
|
||||
constructor(protected http: Http, @Optional() basePath: string) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
import {Http, Headers, RequestOptionsArgs, Response, URLSearchParams} from 'angular2/http';
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {Http, Headers, RequestOptionsArgs, Response, URLSearchParams} from '@angular/http';
|
||||
import {Injectable, Optional} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import * as models from '../model/models';
|
||||
import 'rxjs/Rx';
|
||||
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
@ -12,7 +13,7 @@ export class UserApi {
|
||||
protected basePath = 'http://petstore.swagger.io/v2';
|
||||
public defaultHeaders : Headers = new Headers();
|
||||
|
||||
constructor(protected http: Http, basePath: string) {
|
||||
constructor(protected http: Http, @Optional() basePath: string) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@swagger/angular2-typescript-petstore",
|
||||
"version": "0.0.1-SNAPSHOT.201604282253",
|
||||
"version": "0.0.1-SNAPSHOT.201605120027",
|
||||
"description": "swagger client for @swagger/angular2-typescript-petstore",
|
||||
"author": "Swagger Codegen Contributors",
|
||||
"keywords": [
|
||||
@ -16,17 +16,30 @@
|
||||
"build": "typings install && tsc"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"angular2": "^2.0.0-beta.15",
|
||||
"rxjs": "^5.0.0-beta.2"
|
||||
"@angular/common": "^2.0.0-rc.1",
|
||||
"@angular/compiler": "^2.0.0-rc.1",
|
||||
"@angular/core": "^2.0.0-rc.1",
|
||||
"@angular/http": "^2.0.0-rc.1",
|
||||
"@angular/platform-browser": "^2.0.0-rc.1",
|
||||
"@angular/platform-browser-dynamic": "^2.0.0-rc.1",
|
||||
"core-js": "^2.3.0",
|
||||
"rxjs": "^5.0.0-beta.6",
|
||||
"zone.js": "^0.6.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/common": "^2.0.0-rc.1",
|
||||
"@angular/compiler": "^2.0.0-rc.1",
|
||||
"@angular/core": "^2.0.0-rc.1",
|
||||
"@angular/http": "^2.0.0-rc.1",
|
||||
"@angular/platform-browser": "^2.0.0-rc.1",
|
||||
"@angular/platform-browser-dynamic": "^2.0.0-rc.1",
|
||||
"core-js": "^2.3.0",
|
||||
"rxjs": "^5.0.0-beta.6",
|
||||
"zone.js": "^0.6.12",
|
||||
"typescript": "^1.8.10",
|
||||
"typings": "^0.8.1",
|
||||
"angular2": "^2.0.0-beta.15",
|
||||
"es6-shim": "^0.35.0",
|
||||
"es7-reflect-metadata": "^1.6.0",
|
||||
"rxjs": "5.0.0-beta.2",
|
||||
"zone.js": "^0.6.10"
|
||||
"es7-reflect-metadata": "^1.6.0"
|
||||
},
|
||||
"publishConfig":{
|
||||
"registry":"https://skimdb.npmjs.com/registry"
|
||||
|
Loading…
x
Reference in New Issue
Block a user