update ts angualr2 petstore clients

This commit is contained in:
wing328
2017-05-24 15:55:34 +08:00
parent e12b22d5ce
commit bd227df4db
9 changed files with 12 additions and 3 deletions

View File

@@ -27,6 +27,7 @@ import { Configuration } from '../configurat
@Injectable()
export class PetApi {
protected basePath = 'http://petstore.swagger.io/v2';
public defaultHeaders: Headers = new Headers();
public configuration: Configuration = new Configuration();

View File

@@ -27,6 +27,7 @@ import { Configuration } from '../configurat
@Injectable()
export class StoreApi {
protected basePath = 'http://petstore.swagger.io/v2';
public defaultHeaders: Headers = new Headers();
public configuration: Configuration = new Configuration();

View File

@@ -27,6 +27,7 @@ import { Configuration } from '../configurat
@Injectable()
export class UserApi {
protected basePath = 'http://petstore.swagger.io/v2';
public defaultHeaders: Headers = new Headers();
public configuration: Configuration = new Configuration();

View File

@@ -27,6 +27,7 @@ import { Configuration } from '../configurat
@Injectable()
export class PetApi {
protected basePath = 'http://petstore.swagger.io/v2';
public defaultHeaders: Headers = new Headers();
public configuration: Configuration = new Configuration();

View File

@@ -27,6 +27,7 @@ import { Configuration } from '../configurat
@Injectable()
export class StoreApi {
protected basePath = 'http://petstore.swagger.io/v2';
public defaultHeaders: Headers = new Headers();
public configuration: Configuration = new Configuration();

View File

@@ -27,6 +27,7 @@ import { Configuration } from '../configurat
@Injectable()
export class UserApi {
protected basePath = 'http://petstore.swagger.io/v2';
public defaultHeaders: Headers = new Headers();
public configuration: Configuration = new Configuration();

View File

@@ -0,0 +1 @@
2.2.3-SNAPSHOT

View File

@@ -240,7 +240,9 @@ export class PetApi implements PetApiInterface {
if (petId === null || petId === undefined) {
throw new Error('Required parameter petId was null or undefined when calling deletePet.');
}
headers.set('api_key', String(apiKey));
if (apiKey !== undefined && apiKey !== null) {
headers.set('api_key', String(apiKey));
}
// to determine the Content-Type header
let consumes: string[] = [

View File

@@ -1,6 +1,6 @@
import { OpaqueToken } from '@angular/core';
import { InjectionToken<string> } from '@angular/core';
export const BASE_PATH = new OpaqueToken('basePath');
export const BASE_PATH = new InjectionToken<string>('basePath');
export const COLLECTION_FORMATS = {
'csv': ',',
'tsv': ' ',