Fix issue 10020: [BUG] [typescript-angular] Add "header" to reserved words (#10091)

* Rename queryParameters to localVarQueryParameters

* Rename headers to localVarHeaders

* Rename credential to localVarCredential

* Rename httpHeaderAcceptSelected to localVarHttpHeaderAcceptSelected

* Rename formParams to localVarFormParams

* Rename useForm to localVarUseForm

* Rename convertFormParamsToString to localVarConvertFormParamsToString

* Step 3

* update doc

Co-authored-by: Marius Møller <mm@carbuddii.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
Marius Møller 2021-08-08 20:48:00 +02:00 committed by GitHub
parent ccccb6aa67
commit 664aa2d946
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
56 changed files with 4154 additions and 4424 deletions

View File

@ -178,23 +178,23 @@ export class {{classname}} {
{{/allParams}} {{/allParams}}
{{#hasQueryParams}} {{#hasQueryParams}}
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
{{#queryParams}} {{#queryParams}}
{{#isArray}} {{#isArray}}
if ({{paramName}}) { if ({{paramName}}) {
{{#isQueryParamObjectFormatJson}} {{#isQueryParamObjectFormatJson}}
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>{{paramName}}, '{{baseName}}'); <any>{{paramName}}, '{{baseName}}');
{{/isQueryParamObjectFormatJson}} {{/isQueryParamObjectFormatJson}}
{{^isQueryParamObjectFormatJson}} {{^isQueryParamObjectFormatJson}}
{{#isCollectionFormatMulti}} {{#isCollectionFormatMulti}}
{{paramName}}.forEach((element) => { {{paramName}}.forEach((element) => {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, '{{baseName}}'); <any>element, '{{baseName}}');
}) })
{{/isCollectionFormatMulti}} {{/isCollectionFormatMulti}}
{{^isCollectionFormatMulti}} {{^isCollectionFormatMulti}}
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
{{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}']), '{{baseName}}'); {{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}']), '{{baseName}}');
{{/isCollectionFormatMulti}} {{/isCollectionFormatMulti}}
{{/isQueryParamObjectFormatJson}} {{/isQueryParamObjectFormatJson}}
@ -202,68 +202,68 @@ export class {{classname}} {
{{/isArray}} {{/isArray}}
{{^isArray}} {{^isArray}}
if ({{paramName}} !== undefined && {{paramName}} !== null) { if ({{paramName}} !== undefined && {{paramName}} !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>{{paramName}}, '{{baseName}}'); <any>{{paramName}}, '{{baseName}}');
} }
{{/isArray}} {{/isArray}}
{{/queryParams}} {{/queryParams}}
{{/hasQueryParams}} {{/hasQueryParams}}
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
{{#headerParams}} {{#headerParams}}
{{#isArray}} {{#isArray}}
if ({{paramName}}) { if ({{paramName}}) {
headers = headers.set('{{baseName}}', {{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}'])); localVarHeaders = localVarHeaders.set('{{baseName}}', {{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}']));
} }
{{/isArray}} {{/isArray}}
{{^isArray}} {{^isArray}}
if ({{paramName}} !== undefined && {{paramName}} !== null) { if ({{paramName}} !== undefined && {{paramName}} !== null) {
headers = headers.set('{{baseName}}', String({{paramName}})); localVarHeaders = localVarHeaders.set('{{baseName}}', String({{paramName}}));
} }
{{/isArray}} {{/isArray}}
{{/headerParams}} {{/headerParams}}
{{#authMethods}} {{#authMethods}}
{{#-first}} {{#-first}}
let credential: string | undefined; let localVarCredential: string | undefined;
{{/-first}} {{/-first}}
// authentication ({{name}}) required // authentication ({{name}}) required
credential = this.configuration.lookupCredential('{{name}}'); localVarCredential = this.configuration.lookupCredential('{{name}}');
if (credential) { if (localVarCredential) {
{{#isApiKey}} {{#isApiKey}}
{{#isKeyInHeader}} {{#isKeyInHeader}}
headers = headers.set('{{keyParamName}}', credential); localVarHeaders = localVarHeaders.set('{{keyParamName}}', localVarCredential);
{{/isKeyInHeader}} {{/isKeyInHeader}}
{{#isKeyInQuery}} {{#isKeyInQuery}}
queryParameters = queryParameters.set('{{keyParamName}}', credential); localVarQueryParameters = localVarQueryParameters.set('{{keyParamName}}', localVarCredential);
{{/isKeyInQuery}} {{/isKeyInQuery}}
{{/isApiKey}} {{/isApiKey}}
{{#isBasic}} {{#isBasic}}
{{#isBasicBasic}} {{#isBasicBasic}}
headers = headers.set('Authorization', 'Basic ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
{{/isBasicBasic}} {{/isBasicBasic}}
{{#isBasicBearer}} {{#isBasicBearer}}
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
{{/isBasicBearer}} {{/isBasicBearer}}
{{/isBasic}} {{/isBasic}}
{{#isOAuth}} {{#isOAuth}}
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
{{/isOAuth}} {{/isOAuth}}
} }
{{/authMethods}} {{/authMethods}}
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
{{#produces}} {{#produces}}
'{{{mediaType}}}'{{^-last}},{{/-last}} '{{{mediaType}}}'{{^-last}},{{/-last}}
{{/produces}} {{/produces}}
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
{{#bodyParam}} {{#bodyParam}}
@ -288,68 +288,68 @@ export class {{classname}} {
{{#bodyParam}} {{#bodyParam}}
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
{{/bodyParam}} {{/bodyParam}}
{{#hasFormParams}} {{#hasFormParams}}
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
{{#formParams}} {{#localVarFormParams}}
{{#isFile}} {{#isFile}}
// use FormData to transmit files using content-type "multipart/form-data" // use FormData to transmit files using content-type "multipart/form-data"
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
useForm = canConsumeForm; localVarUseForm = canConsumeForm;
{{/isFile}} {{/isFile}}
{{/formParams}} {{/localVarFormParams}}
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
{{#formParams}} {{#localVarFormParams}}
{{#isArray}} {{#isArray}}
if ({{paramName}}) { if ({{paramName}}) {
{{#isCollectionFormatMulti}} {{#isCollectionFormatMulti}}
{{paramName}}.forEach((element) => { {{paramName}}.forEach((element) => {
formParams = formParams.append('{{baseName}}', <any>element) as any || formParams; localVarFormParams = localVarFormParams.append('{{baseName}}', <any>element) as any || localVarFormParams;
}) })
{{/isCollectionFormatMulti}} {{/isCollectionFormatMulti}}
{{^isCollectionFormatMulti}} {{^isCollectionFormatMulti}}
if (useForm) { if (localVarUseForm) {
{{paramName}}.forEach((element) => { {{paramName}}.forEach((element) => {
formParams = formParams.append('{{baseName}}', <any>element) as any || formParams; localVarFormParams = localVarFormParams.append('{{baseName}}', <any>element) as any || localVarFormParams;
}) })
} else { } else {
formParams = formParams.append('{{baseName}}', {{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}'])) as any || formParams; localVarFormParams = localVarFormParams.append('{{baseName}}', {{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}'])) as any || localVarFormParams;
} }
{{/isCollectionFormatMulti}} {{/isCollectionFormatMulti}}
} }
{{/isArray}} {{/isArray}}
{{^isArray}} {{^isArray}}
if ({{paramName}} !== undefined) { if ({{paramName}} !== undefined) {
formParams = formParams.append('{{baseName}}', {{^isModel}}<any>{{paramName}}{{/isModel}}{{#isModel}}useForm ? new Blob([JSON.stringify({{paramName}})], {type: 'application/json'}) : <any>{{paramName}}{{/isModel}}) as any || formParams; localVarFormParams = localVarFormParams.append('{{baseName}}', {{^isModel}}<any>{{paramName}}{{/isModel}}{{#isModel}}localVarUseForm ? new Blob([JSON.stringify({{paramName}})], {type: 'application/json'}) : <any>{{paramName}}{{/isModel}}) as any || localVarFormParams;
} }
{{/isArray}} {{/isArray}}
{{/formParams}} {{/localVarFormParams}}
{{/hasFormParams}} {{/hasFormParams}}
{{^isResponseFile}} {{^isResponseFile}}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
{{/isResponseFile}} {{/isResponseFile}}
return this.httpClient.{{httpMethod}}{{^isResponseFile}}<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>{{/isResponseFile}}(`${this.configuration.basePath}{{{path}}}`,{{#isBodyAllowed}} return this.httpClient.{{httpMethod}}{{^isResponseFile}}<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>{{/isResponseFile}}(`${this.configuration.basePath}{{{path}}}`,{{#isBodyAllowed}}
{{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}{{#hasFormParams}}convertFormParamsToString ? formParams.toString() : formParams{{/hasFormParams}}{{^hasFormParams}}null{{/hasFormParams}}{{/bodyParam}},{{/isBodyAllowed}} {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}{{#hasFormParams}}localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams{{/hasFormParams}}{{^hasFormParams}}null{{/hasFormParams}}{{/bodyParam}},{{/isBodyAllowed}}
{ {
{{#hasQueryParams}} {{#hasQueryParams}}
params: queryParameters, params: localVarQueryParameters,
{{/hasQueryParams}} {{/hasQueryParams}}
{{#isResponseFile}} {{#isResponseFile}}
responseType: "blob", responseType: "blob",
@ -358,7 +358,7 @@ export class {{classname}} {
responseType: <any>responseType_, responseType: <any>responseType_,
{{/isResponseFile}} {{/isResponseFile}}
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -112,24 +112,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling addPet.'); throw new Error('Required parameter body was null or undefined when calling addPet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -140,11 +140,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -153,7 +153,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -175,32 +175,32 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling deletePet.'); throw new Error('Required parameter petId was null or undefined when calling deletePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
if (apiKey !== undefined && apiKey !== null) { if (apiKey !== undefined && apiKey !== null) {
headers = headers.set('api_key', String(apiKey)); localVarHeaders = localVarHeaders.set('api_key', String(apiKey));
} }
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -208,7 +208,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -230,46 +230,46 @@ export class PetService {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (status) { if (status) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
status.join(COLLECTION_FORMATS['csv']), 'status'); status.join(COLLECTION_FORMATS['csv']), 'status');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -292,46 +292,46 @@ export class PetService {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (tags) { if (tags) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
tags.join(COLLECTION_FORMATS['csv']), 'tags'); tags.join(COLLECTION_FORMATS['csv']), 'tags');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,31 +353,31 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling getPetById.'); throw new Error('Required parameter petId was null or undefined when calling getPetById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -385,7 +385,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,24 +406,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling updatePet.'); throw new Error('Required parameter body was null or undefined when calling updatePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -434,11 +434,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -447,7 +447,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -470,24 +470,24 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -497,33 +497,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (name !== undefined) {
formParams = formParams.append('name', <any>name) as any || formParams;
}
if (status !== undefined) {
formParams = formParams.append('status', <any>status) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -546,25 +540,25 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); throw new Error('Required parameter petId was null or undefined when calling uploadFile.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -574,36 +568,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data" if (localVarUseForm) {
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data localVarFormParams = new FormData();
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (additionalMetadata !== undefined) {
formParams = formParams.append('additionalMetadata', <any>additionalMetadata) as any || formParams;
}
if (file !== undefined) {
formParams = formParams.append('file', <any>file) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,22 +99,22 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -122,7 +122,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -140,30 +140,30 @@ export class StoreService {
public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>; public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>;
public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -171,7 +171,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -193,24 +193,24 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -218,7 +218,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -239,19 +239,19 @@ export class StoreService {
throw new Error('Required parameter body was null or undefined when calling placeOrder.'); throw new Error('Required parameter body was null or undefined when calling placeOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -260,11 +260,11 @@ export class StoreService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -273,7 +273,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,17 +99,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUser.'); throw new Error('Required parameter body was null or undefined when calling createUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -118,11 +118,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -131,7 +131,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -152,17 +152,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -171,11 +171,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -184,7 +184,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -205,17 +205,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -224,11 +224,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -237,7 +237,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -259,22 +259,22 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling deleteUser.'); throw new Error('Required parameter username was null or undefined when calling deleteUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -282,7 +282,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -303,24 +303,24 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling getUserByName.'); throw new Error('Required parameter username was null or undefined when calling getUserByName.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -328,7 +328,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,43 +353,43 @@ export class UserService {
throw new Error('Required parameter password was null or undefined when calling loginUser.'); throw new Error('Required parameter password was null or undefined when calling loginUser.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (username !== undefined && username !== null) { if (username !== undefined && username !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>username, 'username'); <any>username, 'username');
} }
if (password !== undefined && password !== null) { if (password !== undefined && password !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>password, 'password'); <any>password, 'password');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`, return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,22 +406,22 @@ export class UserService {
public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>;
public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -429,7 +429,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -455,17 +455,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling updateUser.'); throw new Error('Required parameter body was null or undefined when calling updateUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -474,11 +474,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -487,7 +487,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -112,24 +112,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling addPet.'); throw new Error('Required parameter body was null or undefined when calling addPet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -140,11 +140,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -153,7 +153,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -175,32 +175,32 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling deletePet.'); throw new Error('Required parameter petId was null or undefined when calling deletePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
if (apiKey !== undefined && apiKey !== null) { if (apiKey !== undefined && apiKey !== null) {
headers = headers.set('api_key', String(apiKey)); localVarHeaders = localVarHeaders.set('api_key', String(apiKey));
} }
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -208,7 +208,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -230,46 +230,46 @@ export class PetService {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (status) { if (status) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
status.join(COLLECTION_FORMATS['csv']), 'status'); status.join(COLLECTION_FORMATS['csv']), 'status');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -292,46 +292,46 @@ export class PetService {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (tags) { if (tags) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
tags.join(COLLECTION_FORMATS['csv']), 'tags'); tags.join(COLLECTION_FORMATS['csv']), 'tags');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,31 +353,31 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling getPetById.'); throw new Error('Required parameter petId was null or undefined when calling getPetById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -385,7 +385,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,24 +406,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling updatePet.'); throw new Error('Required parameter body was null or undefined when calling updatePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -434,11 +434,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -447,7 +447,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -470,24 +470,24 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -497,33 +497,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (name !== undefined) {
formParams = formParams.append('name', <any>name) as any || formParams;
}
if (status !== undefined) {
formParams = formParams.append('status', <any>status) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -546,25 +540,25 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); throw new Error('Required parameter petId was null or undefined when calling uploadFile.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -574,36 +568,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data" if (localVarUseForm) {
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data localVarFormParams = new FormData();
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (additionalMetadata !== undefined) {
formParams = formParams.append('additionalMetadata', <any>additionalMetadata) as any || formParams;
}
if (file !== undefined) {
formParams = formParams.append('file', <any>file) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,22 +99,22 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -122,7 +122,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -140,30 +140,30 @@ export class StoreService {
public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>; public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>;
public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -171,7 +171,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -193,24 +193,24 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -218,7 +218,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -239,19 +239,19 @@ export class StoreService {
throw new Error('Required parameter body was null or undefined when calling placeOrder.'); throw new Error('Required parameter body was null or undefined when calling placeOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -260,11 +260,11 @@ export class StoreService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -273,7 +273,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,17 +99,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUser.'); throw new Error('Required parameter body was null or undefined when calling createUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -118,11 +118,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -131,7 +131,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -152,17 +152,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -171,11 +171,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -184,7 +184,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -205,17 +205,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -224,11 +224,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -237,7 +237,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -259,22 +259,22 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling deleteUser.'); throw new Error('Required parameter username was null or undefined when calling deleteUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -282,7 +282,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -303,24 +303,24 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling getUserByName.'); throw new Error('Required parameter username was null or undefined when calling getUserByName.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -328,7 +328,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,43 +353,43 @@ export class UserService {
throw new Error('Required parameter password was null or undefined when calling loginUser.'); throw new Error('Required parameter password was null or undefined when calling loginUser.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (username !== undefined && username !== null) { if (username !== undefined && username !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>username, 'username'); <any>username, 'username');
} }
if (password !== undefined && password !== null) { if (password !== undefined && password !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>password, 'password'); <any>password, 'password');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`, return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,22 +406,22 @@ export class UserService {
public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>;
public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -429,7 +429,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -455,17 +455,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling updateUser.'); throw new Error('Required parameter body was null or undefined when calling updateUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -474,11 +474,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -487,7 +487,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -93,23 +93,23 @@ export class DefaultService {
public rootGet(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Fruit>>; public rootGet(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Fruit>>;
public rootGet(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public rootGet(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -117,7 +117,7 @@ export class DefaultService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -112,24 +112,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling addPet.'); throw new Error('Required parameter body was null or undefined when calling addPet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -140,11 +140,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -153,7 +153,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -175,32 +175,32 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling deletePet.'); throw new Error('Required parameter petId was null or undefined when calling deletePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
if (apiKey !== undefined && apiKey !== null) { if (apiKey !== undefined && apiKey !== null) {
headers = headers.set('api_key', String(apiKey)); localVarHeaders = localVarHeaders.set('api_key', String(apiKey));
} }
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -208,7 +208,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -230,46 +230,46 @@ export class PetService {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (status) { if (status) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
status.join(COLLECTION_FORMATS['csv']), 'status'); status.join(COLLECTION_FORMATS['csv']), 'status');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -292,46 +292,46 @@ export class PetService {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (tags) { if (tags) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
tags.join(COLLECTION_FORMATS['csv']), 'tags'); tags.join(COLLECTION_FORMATS['csv']), 'tags');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,31 +353,31 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling getPetById.'); throw new Error('Required parameter petId was null or undefined when calling getPetById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -385,7 +385,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,24 +406,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling updatePet.'); throw new Error('Required parameter body was null or undefined when calling updatePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -434,11 +434,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -447,7 +447,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -470,24 +470,24 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -497,33 +497,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (name !== undefined) {
formParams = formParams.append('name', <any>name) as any || formParams;
}
if (status !== undefined) {
formParams = formParams.append('status', <any>status) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -546,25 +540,25 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); throw new Error('Required parameter petId was null or undefined when calling uploadFile.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -574,36 +568,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data" if (localVarUseForm) {
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data localVarFormParams = new FormData();
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (additionalMetadata !== undefined) {
formParams = formParams.append('additionalMetadata', <any>additionalMetadata) as any || formParams;
}
if (file !== undefined) {
formParams = formParams.append('file', <any>file) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,22 +99,22 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -122,7 +122,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -140,30 +140,30 @@ export class StoreService {
public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>; public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>;
public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -171,7 +171,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -193,24 +193,24 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -218,7 +218,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -239,19 +239,19 @@ export class StoreService {
throw new Error('Required parameter body was null or undefined when calling placeOrder.'); throw new Error('Required parameter body was null or undefined when calling placeOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -260,11 +260,11 @@ export class StoreService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -273,7 +273,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,17 +99,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUser.'); throw new Error('Required parameter body was null or undefined when calling createUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -118,11 +118,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -131,7 +131,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -152,17 +152,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -171,11 +171,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -184,7 +184,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -205,17 +205,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -224,11 +224,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -237,7 +237,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -259,22 +259,22 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling deleteUser.'); throw new Error('Required parameter username was null or undefined when calling deleteUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -282,7 +282,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -303,24 +303,24 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling getUserByName.'); throw new Error('Required parameter username was null or undefined when calling getUserByName.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -328,7 +328,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,43 +353,43 @@ export class UserService {
throw new Error('Required parameter password was null or undefined when calling loginUser.'); throw new Error('Required parameter password was null or undefined when calling loginUser.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (username !== undefined && username !== null) { if (username !== undefined && username !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>username, 'username'); <any>username, 'username');
} }
if (password !== undefined && password !== null) { if (password !== undefined && password !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>password, 'password'); <any>password, 'password');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`, return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,22 +406,22 @@ export class UserService {
public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>;
public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -429,7 +429,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -455,17 +455,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling updateUser.'); throw new Error('Required parameter body was null or undefined when calling updateUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -474,11 +474,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -487,7 +487,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -112,24 +112,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling addPet.'); throw new Error('Required parameter body was null or undefined when calling addPet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -140,11 +140,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -153,7 +153,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -175,32 +175,32 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling deletePet.'); throw new Error('Required parameter petId was null or undefined when calling deletePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
if (apiKey !== undefined && apiKey !== null) { if (apiKey !== undefined && apiKey !== null) {
headers = headers.set('api_key', String(apiKey)); localVarHeaders = localVarHeaders.set('api_key', String(apiKey));
} }
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -208,7 +208,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -230,46 +230,46 @@ export class PetService {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (status) { if (status) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
status.join(COLLECTION_FORMATS['csv']), 'status'); status.join(COLLECTION_FORMATS['csv']), 'status');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -292,46 +292,46 @@ export class PetService {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (tags) { if (tags) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
tags.join(COLLECTION_FORMATS['csv']), 'tags'); tags.join(COLLECTION_FORMATS['csv']), 'tags');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,31 +353,31 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling getPetById.'); throw new Error('Required parameter petId was null or undefined when calling getPetById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -385,7 +385,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,24 +406,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling updatePet.'); throw new Error('Required parameter body was null or undefined when calling updatePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -434,11 +434,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -447,7 +447,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -470,24 +470,24 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -497,33 +497,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (name !== undefined) {
formParams = formParams.append('name', <any>name) as any || formParams;
}
if (status !== undefined) {
formParams = formParams.append('status', <any>status) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -546,25 +540,25 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); throw new Error('Required parameter petId was null or undefined when calling uploadFile.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -574,36 +568,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data" if (localVarUseForm) {
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data localVarFormParams = new FormData();
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (additionalMetadata !== undefined) {
formParams = formParams.append('additionalMetadata', <any>additionalMetadata) as any || formParams;
}
if (file !== undefined) {
formParams = formParams.append('file', <any>file) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,22 +99,22 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -122,7 +122,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -140,30 +140,30 @@ export class StoreService {
public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>; public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>;
public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -171,7 +171,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -193,24 +193,24 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -218,7 +218,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -239,19 +239,19 @@ export class StoreService {
throw new Error('Required parameter body was null or undefined when calling placeOrder.'); throw new Error('Required parameter body was null or undefined when calling placeOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -260,11 +260,11 @@ export class StoreService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -273,7 +273,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,17 +99,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUser.'); throw new Error('Required parameter body was null or undefined when calling createUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -118,11 +118,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -131,7 +131,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -152,17 +152,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -171,11 +171,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -184,7 +184,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -205,17 +205,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -224,11 +224,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -237,7 +237,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -259,22 +259,22 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling deleteUser.'); throw new Error('Required parameter username was null or undefined when calling deleteUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -282,7 +282,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -303,24 +303,24 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling getUserByName.'); throw new Error('Required parameter username was null or undefined when calling getUserByName.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -328,7 +328,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,43 +353,43 @@ export class UserService {
throw new Error('Required parameter password was null or undefined when calling loginUser.'); throw new Error('Required parameter password was null or undefined when calling loginUser.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (username !== undefined && username !== null) { if (username !== undefined && username !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>username, 'username'); <any>username, 'username');
} }
if (password !== undefined && password !== null) { if (password !== undefined && password !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>password, 'password'); <any>password, 'password');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`, return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,22 +406,22 @@ export class UserService {
public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>;
public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -429,7 +429,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -455,17 +455,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling updateUser.'); throw new Error('Required parameter body was null or undefined when calling updateUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -474,11 +474,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -487,7 +487,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -110,24 +110,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling addPet.'); throw new Error('Required parameter body was null or undefined when calling addPet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -138,11 +138,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -151,7 +151,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -173,32 +173,32 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling deletePet.'); throw new Error('Required parameter petId was null or undefined when calling deletePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
if (apiKey !== undefined && apiKey !== null) { if (apiKey !== undefined && apiKey !== null) {
headers = headers.set('api_key', String(apiKey)); localVarHeaders = localVarHeaders.set('api_key', String(apiKey));
} }
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -206,7 +206,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -228,46 +228,46 @@ export class PetService {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (status) { if (status) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
status.join(COLLECTION_FORMATS['csv']), 'status'); status.join(COLLECTION_FORMATS['csv']), 'status');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -290,46 +290,46 @@ export class PetService {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (tags) { if (tags) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
tags.join(COLLECTION_FORMATS['csv']), 'tags'); tags.join(COLLECTION_FORMATS['csv']), 'tags');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -351,31 +351,31 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling getPetById.'); throw new Error('Required parameter petId was null or undefined when calling getPetById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -383,7 +383,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -404,24 +404,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling updatePet.'); throw new Error('Required parameter body was null or undefined when calling updatePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -432,11 +432,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -445,7 +445,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -468,24 +468,24 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -495,33 +495,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (name !== undefined) {
formParams = formParams.append('name', <any>name) as any || formParams;
}
if (status !== undefined) {
formParams = formParams.append('status', <any>status) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -544,25 +538,25 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); throw new Error('Required parameter petId was null or undefined when calling uploadFile.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -572,36 +566,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data" if (localVarUseForm) {
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data localVarFormParams = new FormData();
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (additionalMetadata !== undefined) {
formParams = formParams.append('additionalMetadata', <any>additionalMetadata) as any || formParams;
}
if (file !== undefined) {
formParams = formParams.append('file', <any>file) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -97,22 +97,22 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -120,7 +120,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -138,30 +138,30 @@ export class StoreService {
public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>; public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>;
public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -169,7 +169,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -191,24 +191,24 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -216,7 +216,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -237,19 +237,19 @@ export class StoreService {
throw new Error('Required parameter body was null or undefined when calling placeOrder.'); throw new Error('Required parameter body was null or undefined when calling placeOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -258,11 +258,11 @@ export class StoreService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -271,7 +271,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -97,17 +97,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUser.'); throw new Error('Required parameter body was null or undefined when calling createUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -116,11 +116,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -129,7 +129,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -150,17 +150,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -169,11 +169,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -182,7 +182,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -203,17 +203,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -222,11 +222,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -235,7 +235,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -257,22 +257,22 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling deleteUser.'); throw new Error('Required parameter username was null or undefined when calling deleteUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -280,7 +280,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -301,24 +301,24 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling getUserByName.'); throw new Error('Required parameter username was null or undefined when calling getUserByName.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -326,7 +326,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -351,43 +351,43 @@ export class UserService {
throw new Error('Required parameter password was null or undefined when calling loginUser.'); throw new Error('Required parameter password was null or undefined when calling loginUser.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (username !== undefined && username !== null) { if (username !== undefined && username !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>username, 'username'); <any>username, 'username');
} }
if (password !== undefined && password !== null) { if (password !== undefined && password !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>password, 'password'); <any>password, 'password');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`, return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -404,22 +404,22 @@ export class UserService {
public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>;
public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -427,7 +427,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -453,17 +453,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling updateUser.'); throw new Error('Required parameter body was null or undefined when calling updateUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -472,11 +472,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -485,7 +485,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -110,24 +110,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling addPet.'); throw new Error('Required parameter body was null or undefined when calling addPet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -138,11 +138,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -151,7 +151,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -173,32 +173,32 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling deletePet.'); throw new Error('Required parameter petId was null or undefined when calling deletePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
if (apiKey !== undefined && apiKey !== null) { if (apiKey !== undefined && apiKey !== null) {
headers = headers.set('api_key', String(apiKey)); localVarHeaders = localVarHeaders.set('api_key', String(apiKey));
} }
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -206,7 +206,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -228,46 +228,46 @@ export class PetService {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (status) { if (status) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
status.join(COLLECTION_FORMATS['csv']), 'status'); status.join(COLLECTION_FORMATS['csv']), 'status');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -290,46 +290,46 @@ export class PetService {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (tags) { if (tags) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
tags.join(COLLECTION_FORMATS['csv']), 'tags'); tags.join(COLLECTION_FORMATS['csv']), 'tags');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -351,31 +351,31 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling getPetById.'); throw new Error('Required parameter petId was null or undefined when calling getPetById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -383,7 +383,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -404,24 +404,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling updatePet.'); throw new Error('Required parameter body was null or undefined when calling updatePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -432,11 +432,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -445,7 +445,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -468,24 +468,24 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -495,33 +495,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (name !== undefined) {
formParams = formParams.append('name', <any>name) as any || formParams;
}
if (status !== undefined) {
formParams = formParams.append('status', <any>status) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -544,25 +538,25 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); throw new Error('Required parameter petId was null or undefined when calling uploadFile.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -572,36 +566,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data" if (localVarUseForm) {
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data localVarFormParams = new FormData();
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (additionalMetadata !== undefined) {
formParams = formParams.append('additionalMetadata', <any>additionalMetadata) as any || formParams;
}
if (file !== undefined) {
formParams = formParams.append('file', <any>file) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -97,22 +97,22 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -120,7 +120,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -138,30 +138,30 @@ export class StoreService {
public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>; public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>;
public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -169,7 +169,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -191,24 +191,24 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -216,7 +216,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -237,19 +237,19 @@ export class StoreService {
throw new Error('Required parameter body was null or undefined when calling placeOrder.'); throw new Error('Required parameter body was null or undefined when calling placeOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -258,11 +258,11 @@ export class StoreService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -271,7 +271,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -97,17 +97,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUser.'); throw new Error('Required parameter body was null or undefined when calling createUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -116,11 +116,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -129,7 +129,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -150,17 +150,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -169,11 +169,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -182,7 +182,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -203,17 +203,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -222,11 +222,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -235,7 +235,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -257,22 +257,22 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling deleteUser.'); throw new Error('Required parameter username was null or undefined when calling deleteUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -280,7 +280,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -301,24 +301,24 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling getUserByName.'); throw new Error('Required parameter username was null or undefined when calling getUserByName.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -326,7 +326,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -351,43 +351,43 @@ export class UserService {
throw new Error('Required parameter password was null or undefined when calling loginUser.'); throw new Error('Required parameter password was null or undefined when calling loginUser.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (username !== undefined && username !== null) { if (username !== undefined && username !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>username, 'username'); <any>username, 'username');
} }
if (password !== undefined && password !== null) { if (password !== undefined && password !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>password, 'password'); <any>password, 'password');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`, return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -404,22 +404,22 @@ export class UserService {
public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>;
public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -427,7 +427,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -453,17 +453,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling updateUser.'); throw new Error('Required parameter body was null or undefined when calling updateUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -472,11 +472,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -485,7 +485,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -112,24 +112,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling addPet.'); throw new Error('Required parameter body was null or undefined when calling addPet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -140,11 +140,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -153,7 +153,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -175,32 +175,32 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling deletePet.'); throw new Error('Required parameter petId was null or undefined when calling deletePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
if (apiKey !== undefined && apiKey !== null) { if (apiKey !== undefined && apiKey !== null) {
headers = headers.set('api_key', String(apiKey)); localVarHeaders = localVarHeaders.set('api_key', String(apiKey));
} }
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -208,7 +208,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -230,46 +230,46 @@ export class PetService {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (status) { if (status) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
status.join(COLLECTION_FORMATS['csv']), 'status'); status.join(COLLECTION_FORMATS['csv']), 'status');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -292,46 +292,46 @@ export class PetService {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (tags) { if (tags) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
tags.join(COLLECTION_FORMATS['csv']), 'tags'); tags.join(COLLECTION_FORMATS['csv']), 'tags');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,31 +353,31 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling getPetById.'); throw new Error('Required parameter petId was null or undefined when calling getPetById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -385,7 +385,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,24 +406,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling updatePet.'); throw new Error('Required parameter body was null or undefined when calling updatePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -434,11 +434,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -447,7 +447,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -470,24 +470,24 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -497,33 +497,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (name !== undefined) {
formParams = formParams.append('name', <any>name) as any || formParams;
}
if (status !== undefined) {
formParams = formParams.append('status', <any>status) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -546,25 +540,25 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); throw new Error('Required parameter petId was null or undefined when calling uploadFile.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -574,36 +568,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data" if (localVarUseForm) {
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data localVarFormParams = new FormData();
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (additionalMetadata !== undefined) {
formParams = formParams.append('additionalMetadata', <any>additionalMetadata) as any || formParams;
}
if (file !== undefined) {
formParams = formParams.append('file', <any>file) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,22 +99,22 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -122,7 +122,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -140,30 +140,30 @@ export class StoreService {
public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>; public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>;
public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -171,7 +171,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -193,24 +193,24 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -218,7 +218,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -239,19 +239,19 @@ export class StoreService {
throw new Error('Required parameter body was null or undefined when calling placeOrder.'); throw new Error('Required parameter body was null or undefined when calling placeOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -260,11 +260,11 @@ export class StoreService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -273,7 +273,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,17 +99,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUser.'); throw new Error('Required parameter body was null or undefined when calling createUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -118,11 +118,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -131,7 +131,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -152,17 +152,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -171,11 +171,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -184,7 +184,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -205,17 +205,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -224,11 +224,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -237,7 +237,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -259,22 +259,22 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling deleteUser.'); throw new Error('Required parameter username was null or undefined when calling deleteUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -282,7 +282,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -303,24 +303,24 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling getUserByName.'); throw new Error('Required parameter username was null or undefined when calling getUserByName.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -328,7 +328,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,43 +353,43 @@ export class UserService {
throw new Error('Required parameter password was null or undefined when calling loginUser.'); throw new Error('Required parameter password was null or undefined when calling loginUser.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (username !== undefined && username !== null) { if (username !== undefined && username !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>username, 'username'); <any>username, 'username');
} }
if (password !== undefined && password !== null) { if (password !== undefined && password !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>password, 'password'); <any>password, 'password');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`, return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,22 +406,22 @@ export class UserService {
public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>;
public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -429,7 +429,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -455,17 +455,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling updateUser.'); throw new Error('Required parameter body was null or undefined when calling updateUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -474,11 +474,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -487,7 +487,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -112,24 +112,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling addPet.'); throw new Error('Required parameter body was null or undefined when calling addPet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -140,11 +140,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -153,7 +153,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -175,32 +175,32 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling deletePet.'); throw new Error('Required parameter petId was null or undefined when calling deletePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
if (apiKey !== undefined && apiKey !== null) { if (apiKey !== undefined && apiKey !== null) {
headers = headers.set('api_key', String(apiKey)); localVarHeaders = localVarHeaders.set('api_key', String(apiKey));
} }
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -208,7 +208,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -230,46 +230,46 @@ export class PetService {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (status) { if (status) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
status.join(COLLECTION_FORMATS['csv']), 'status'); status.join(COLLECTION_FORMATS['csv']), 'status');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -292,46 +292,46 @@ export class PetService {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (tags) { if (tags) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
tags.join(COLLECTION_FORMATS['csv']), 'tags'); tags.join(COLLECTION_FORMATS['csv']), 'tags');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,31 +353,31 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling getPetById.'); throw new Error('Required parameter petId was null or undefined when calling getPetById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -385,7 +385,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,24 +406,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling updatePet.'); throw new Error('Required parameter body was null or undefined when calling updatePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -434,11 +434,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -447,7 +447,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -470,24 +470,24 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -497,33 +497,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (name !== undefined) {
formParams = formParams.append('name', <any>name) as any || formParams;
}
if (status !== undefined) {
formParams = formParams.append('status', <any>status) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -546,25 +540,25 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); throw new Error('Required parameter petId was null or undefined when calling uploadFile.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -574,36 +568,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data" if (localVarUseForm) {
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data localVarFormParams = new FormData();
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (additionalMetadata !== undefined) {
formParams = formParams.append('additionalMetadata', <any>additionalMetadata) as any || formParams;
}
if (file !== undefined) {
formParams = formParams.append('file', <any>file) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,22 +99,22 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -122,7 +122,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -140,30 +140,30 @@ export class StoreService {
public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>; public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>;
public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -171,7 +171,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -193,24 +193,24 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -218,7 +218,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -239,19 +239,19 @@ export class StoreService {
throw new Error('Required parameter body was null or undefined when calling placeOrder.'); throw new Error('Required parameter body was null or undefined when calling placeOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -260,11 +260,11 @@ export class StoreService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -273,7 +273,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,17 +99,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUser.'); throw new Error('Required parameter body was null or undefined when calling createUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -118,11 +118,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -131,7 +131,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -152,17 +152,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -171,11 +171,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -184,7 +184,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -205,17 +205,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -224,11 +224,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -237,7 +237,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -259,22 +259,22 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling deleteUser.'); throw new Error('Required parameter username was null or undefined when calling deleteUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -282,7 +282,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -303,24 +303,24 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling getUserByName.'); throw new Error('Required parameter username was null or undefined when calling getUserByName.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -328,7 +328,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,43 +353,43 @@ export class UserService {
throw new Error('Required parameter password was null or undefined when calling loginUser.'); throw new Error('Required parameter password was null or undefined when calling loginUser.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (username !== undefined && username !== null) { if (username !== undefined && username !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>username, 'username'); <any>username, 'username');
} }
if (password !== undefined && password !== null) { if (password !== undefined && password !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>password, 'password'); <any>password, 'password');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`, return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,22 +406,22 @@ export class UserService {
public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>;
public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -429,7 +429,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -455,17 +455,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling updateUser.'); throw new Error('Required parameter body was null or undefined when calling updateUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -474,11 +474,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -487,7 +487,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -110,24 +110,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling addPet.'); throw new Error('Required parameter body was null or undefined when calling addPet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -138,11 +138,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -151,7 +151,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -173,32 +173,32 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling deletePet.'); throw new Error('Required parameter petId was null or undefined when calling deletePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
if (apiKey !== undefined && apiKey !== null) { if (apiKey !== undefined && apiKey !== null) {
headers = headers.set('api_key', String(apiKey)); localVarHeaders = localVarHeaders.set('api_key', String(apiKey));
} }
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -206,7 +206,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -228,46 +228,46 @@ export class PetService {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (status) { if (status) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
status.join(COLLECTION_FORMATS['csv']), 'status'); status.join(COLLECTION_FORMATS['csv']), 'status');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -290,46 +290,46 @@ export class PetService {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (tags) { if (tags) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
tags.join(COLLECTION_FORMATS['csv']), 'tags'); tags.join(COLLECTION_FORMATS['csv']), 'tags');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -351,31 +351,31 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling getPetById.'); throw new Error('Required parameter petId was null or undefined when calling getPetById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -383,7 +383,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -404,24 +404,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling updatePet.'); throw new Error('Required parameter body was null or undefined when calling updatePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -432,11 +432,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -445,7 +445,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -468,24 +468,24 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -495,33 +495,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (name !== undefined) {
formParams = formParams.append('name', <any>name) as any || formParams;
}
if (status !== undefined) {
formParams = formParams.append('status', <any>status) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -544,25 +538,25 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); throw new Error('Required parameter petId was null or undefined when calling uploadFile.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -572,36 +566,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data" if (localVarUseForm) {
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data localVarFormParams = new FormData();
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (additionalMetadata !== undefined) {
formParams = formParams.append('additionalMetadata', <any>additionalMetadata) as any || formParams;
}
if (file !== undefined) {
formParams = formParams.append('file', <any>file) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -97,22 +97,22 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -120,7 +120,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -138,30 +138,30 @@ export class StoreService {
public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>; public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>;
public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -169,7 +169,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -191,24 +191,24 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -216,7 +216,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -237,19 +237,19 @@ export class StoreService {
throw new Error('Required parameter body was null or undefined when calling placeOrder.'); throw new Error('Required parameter body was null or undefined when calling placeOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -258,11 +258,11 @@ export class StoreService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -271,7 +271,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -97,17 +97,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUser.'); throw new Error('Required parameter body was null or undefined when calling createUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -116,11 +116,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -129,7 +129,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -150,17 +150,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -169,11 +169,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -182,7 +182,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -203,17 +203,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -222,11 +222,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -235,7 +235,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -257,22 +257,22 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling deleteUser.'); throw new Error('Required parameter username was null or undefined when calling deleteUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -280,7 +280,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -301,24 +301,24 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling getUserByName.'); throw new Error('Required parameter username was null or undefined when calling getUserByName.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -326,7 +326,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -351,43 +351,43 @@ export class UserService {
throw new Error('Required parameter password was null or undefined when calling loginUser.'); throw new Error('Required parameter password was null or undefined when calling loginUser.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (username !== undefined && username !== null) { if (username !== undefined && username !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>username, 'username'); <any>username, 'username');
} }
if (password !== undefined && password !== null) { if (password !== undefined && password !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>password, 'password'); <any>password, 'password');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`, return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -404,22 +404,22 @@ export class UserService {
public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>;
public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -427,7 +427,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -453,17 +453,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling updateUser.'); throw new Error('Required parameter body was null or undefined when calling updateUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -472,11 +472,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -485,7 +485,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -110,24 +110,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling addPet.'); throw new Error('Required parameter body was null or undefined when calling addPet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -138,11 +138,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -151,7 +151,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -173,32 +173,32 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling deletePet.'); throw new Error('Required parameter petId was null or undefined when calling deletePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
if (apiKey !== undefined && apiKey !== null) { if (apiKey !== undefined && apiKey !== null) {
headers = headers.set('api_key', String(apiKey)); localVarHeaders = localVarHeaders.set('api_key', String(apiKey));
} }
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -206,7 +206,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -228,46 +228,46 @@ export class PetService {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (status) { if (status) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
status.join(COLLECTION_FORMATS['csv']), 'status'); status.join(COLLECTION_FORMATS['csv']), 'status');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -290,46 +290,46 @@ export class PetService {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (tags) { if (tags) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
tags.join(COLLECTION_FORMATS['csv']), 'tags'); tags.join(COLLECTION_FORMATS['csv']), 'tags');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -351,31 +351,31 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling getPetById.'); throw new Error('Required parameter petId was null or undefined when calling getPetById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -383,7 +383,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -404,24 +404,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling updatePet.'); throw new Error('Required parameter body was null or undefined when calling updatePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -432,11 +432,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -445,7 +445,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -468,24 +468,24 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -495,33 +495,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (name !== undefined) {
formParams = formParams.append('name', <any>name) as any || formParams;
}
if (status !== undefined) {
formParams = formParams.append('status', <any>status) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -544,25 +538,25 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); throw new Error('Required parameter petId was null or undefined when calling uploadFile.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -572,36 +566,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data" if (localVarUseForm) {
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data localVarFormParams = new FormData();
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (additionalMetadata !== undefined) {
formParams = formParams.append('additionalMetadata', <any>additionalMetadata) as any || formParams;
}
if (file !== undefined) {
formParams = formParams.append('file', <any>file) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -97,22 +97,22 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -120,7 +120,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -138,30 +138,30 @@ export class StoreService {
public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>; public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>;
public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -169,7 +169,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -191,24 +191,24 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -216,7 +216,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -237,19 +237,19 @@ export class StoreService {
throw new Error('Required parameter body was null or undefined when calling placeOrder.'); throw new Error('Required parameter body was null or undefined when calling placeOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -258,11 +258,11 @@ export class StoreService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -271,7 +271,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -97,17 +97,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUser.'); throw new Error('Required parameter body was null or undefined when calling createUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -116,11 +116,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -129,7 +129,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -150,17 +150,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -169,11 +169,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -182,7 +182,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -203,17 +203,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -222,11 +222,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -235,7 +235,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -257,22 +257,22 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling deleteUser.'); throw new Error('Required parameter username was null or undefined when calling deleteUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -280,7 +280,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -301,24 +301,24 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling getUserByName.'); throw new Error('Required parameter username was null or undefined when calling getUserByName.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -326,7 +326,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -351,43 +351,43 @@ export class UserService {
throw new Error('Required parameter password was null or undefined when calling loginUser.'); throw new Error('Required parameter password was null or undefined when calling loginUser.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (username !== undefined && username !== null) { if (username !== undefined && username !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>username, 'username'); <any>username, 'username');
} }
if (password !== undefined && password !== null) { if (password !== undefined && password !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>password, 'password'); <any>password, 'password');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`, return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -404,22 +404,22 @@ export class UserService {
public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>;
public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -427,7 +427,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -453,17 +453,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling updateUser.'); throw new Error('Required parameter body was null or undefined when calling updateUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -472,11 +472,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -485,7 +485,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -112,24 +112,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling addPet.'); throw new Error('Required parameter body was null or undefined when calling addPet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -140,11 +140,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -153,7 +153,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -175,32 +175,32 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling deletePet.'); throw new Error('Required parameter petId was null or undefined when calling deletePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
if (apiKey !== undefined && apiKey !== null) { if (apiKey !== undefined && apiKey !== null) {
headers = headers.set('api_key', String(apiKey)); localVarHeaders = localVarHeaders.set('api_key', String(apiKey));
} }
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -208,7 +208,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -230,46 +230,46 @@ export class PetService {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (status) { if (status) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
status.join(COLLECTION_FORMATS['csv']), 'status'); status.join(COLLECTION_FORMATS['csv']), 'status');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -292,46 +292,46 @@ export class PetService {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (tags) { if (tags) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
tags.join(COLLECTION_FORMATS['csv']), 'tags'); tags.join(COLLECTION_FORMATS['csv']), 'tags');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,31 +353,31 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling getPetById.'); throw new Error('Required parameter petId was null or undefined when calling getPetById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -385,7 +385,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,24 +406,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling updatePet.'); throw new Error('Required parameter body was null or undefined when calling updatePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -434,11 +434,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -447,7 +447,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -470,24 +470,24 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -497,33 +497,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (name !== undefined) {
formParams = formParams.append('name', <any>name) as any || formParams;
}
if (status !== undefined) {
formParams = formParams.append('status', <any>status) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -546,25 +540,25 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); throw new Error('Required parameter petId was null or undefined when calling uploadFile.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -574,36 +568,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data" if (localVarUseForm) {
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data localVarFormParams = new FormData();
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (additionalMetadata !== undefined) {
formParams = formParams.append('additionalMetadata', <any>additionalMetadata) as any || formParams;
}
if (file !== undefined) {
formParams = formParams.append('file', <any>file) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,22 +99,22 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -122,7 +122,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -140,30 +140,30 @@ export class StoreService {
public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>; public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>;
public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -171,7 +171,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -193,24 +193,24 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -218,7 +218,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -239,19 +239,19 @@ export class StoreService {
throw new Error('Required parameter body was null or undefined when calling placeOrder.'); throw new Error('Required parameter body was null or undefined when calling placeOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -260,11 +260,11 @@ export class StoreService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -273,7 +273,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,17 +99,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUser.'); throw new Error('Required parameter body was null or undefined when calling createUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -118,11 +118,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -131,7 +131,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -152,17 +152,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -171,11 +171,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -184,7 +184,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -205,17 +205,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -224,11 +224,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -237,7 +237,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -259,22 +259,22 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling deleteUser.'); throw new Error('Required parameter username was null or undefined when calling deleteUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -282,7 +282,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -303,24 +303,24 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling getUserByName.'); throw new Error('Required parameter username was null or undefined when calling getUserByName.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -328,7 +328,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,43 +353,43 @@ export class UserService {
throw new Error('Required parameter password was null or undefined when calling loginUser.'); throw new Error('Required parameter password was null or undefined when calling loginUser.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (username !== undefined && username !== null) { if (username !== undefined && username !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>username, 'username'); <any>username, 'username');
} }
if (password !== undefined && password !== null) { if (password !== undefined && password !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>password, 'password'); <any>password, 'password');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`, return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,22 +406,22 @@ export class UserService {
public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>;
public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -429,7 +429,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -455,17 +455,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling updateUser.'); throw new Error('Required parameter body was null or undefined when calling updateUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -474,11 +474,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -487,7 +487,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -112,24 +112,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling addPet.'); throw new Error('Required parameter body was null or undefined when calling addPet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -140,11 +140,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -153,7 +153,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -175,32 +175,32 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling deletePet.'); throw new Error('Required parameter petId was null or undefined when calling deletePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
if (apiKey !== undefined && apiKey !== null) { if (apiKey !== undefined && apiKey !== null) {
headers = headers.set('api_key', String(apiKey)); localVarHeaders = localVarHeaders.set('api_key', String(apiKey));
} }
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -208,7 +208,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -230,46 +230,46 @@ export class PetService {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (status) { if (status) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
status.join(COLLECTION_FORMATS['csv']), 'status'); status.join(COLLECTION_FORMATS['csv']), 'status');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -292,46 +292,46 @@ export class PetService {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (tags) { if (tags) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
tags.join(COLLECTION_FORMATS['csv']), 'tags'); tags.join(COLLECTION_FORMATS['csv']), 'tags');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,31 +353,31 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling getPetById.'); throw new Error('Required parameter petId was null or undefined when calling getPetById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -385,7 +385,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,24 +406,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling updatePet.'); throw new Error('Required parameter body was null or undefined when calling updatePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -434,11 +434,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -447,7 +447,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -470,24 +470,24 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -497,33 +497,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (name !== undefined) {
formParams = formParams.append('name', <any>name) as any || formParams;
}
if (status !== undefined) {
formParams = formParams.append('status', <any>status) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -546,25 +540,25 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); throw new Error('Required parameter petId was null or undefined when calling uploadFile.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -574,36 +568,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data" if (localVarUseForm) {
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data localVarFormParams = new FormData();
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (additionalMetadata !== undefined) {
formParams = formParams.append('additionalMetadata', <any>additionalMetadata) as any || formParams;
}
if (file !== undefined) {
formParams = formParams.append('file', <any>file) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,22 +99,22 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -122,7 +122,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -140,30 +140,30 @@ export class StoreService {
public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>; public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>;
public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -171,7 +171,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -193,24 +193,24 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -218,7 +218,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -239,19 +239,19 @@ export class StoreService {
throw new Error('Required parameter body was null or undefined when calling placeOrder.'); throw new Error('Required parameter body was null or undefined when calling placeOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -260,11 +260,11 @@ export class StoreService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -273,7 +273,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,17 +99,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUser.'); throw new Error('Required parameter body was null or undefined when calling createUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -118,11 +118,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -131,7 +131,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -152,17 +152,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -171,11 +171,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -184,7 +184,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -205,17 +205,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -224,11 +224,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -237,7 +237,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -259,22 +259,22 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling deleteUser.'); throw new Error('Required parameter username was null or undefined when calling deleteUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -282,7 +282,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -303,24 +303,24 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling getUserByName.'); throw new Error('Required parameter username was null or undefined when calling getUserByName.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -328,7 +328,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,43 +353,43 @@ export class UserService {
throw new Error('Required parameter password was null or undefined when calling loginUser.'); throw new Error('Required parameter password was null or undefined when calling loginUser.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (username !== undefined && username !== null) { if (username !== undefined && username !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>username, 'username'); <any>username, 'username');
} }
if (password !== undefined && password !== null) { if (password !== undefined && password !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>password, 'password'); <any>password, 'password');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`, return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,22 +406,22 @@ export class UserService {
public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>;
public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -429,7 +429,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -455,17 +455,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling updateUser.'); throw new Error('Required parameter body was null or undefined when calling updateUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -474,11 +474,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -487,7 +487,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -162,24 +162,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling addPet.'); throw new Error('Required parameter body was null or undefined when calling addPet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -190,11 +190,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -203,7 +203,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -226,32 +226,32 @@ export class PetService {
} }
const apiKey = requestParameters.apiKey; const apiKey = requestParameters.apiKey;
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
if (apiKey !== undefined && apiKey !== null) { if (apiKey !== undefined && apiKey !== null) {
headers = headers.set('api_key', String(apiKey)); localVarHeaders = localVarHeaders.set('api_key', String(apiKey));
} }
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -259,7 +259,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -282,46 +282,46 @@ export class PetService {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (status) { if (status) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
status.join(COLLECTION_FORMATS['csv']), 'status'); status.join(COLLECTION_FORMATS['csv']), 'status');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -345,46 +345,46 @@ export class PetService {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (tags) { if (tags) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
tags.join(COLLECTION_FORMATS['csv']), 'tags'); tags.join(COLLECTION_FORMATS['csv']), 'tags');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -407,31 +407,31 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling getPetById.'); throw new Error('Required parameter petId was null or undefined when calling getPetById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -439,7 +439,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -461,24 +461,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling updatePet.'); throw new Error('Required parameter body was null or undefined when calling updatePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -489,11 +489,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -502,7 +502,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -526,24 +526,24 @@ export class PetService {
const name = requestParameters.name; const name = requestParameters.name;
const status = requestParameters.status; const status = requestParameters.status;
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -553,33 +553,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (name !== undefined) {
formParams = formParams.append('name', <any>name) as any || formParams;
}
if (status !== undefined) {
formParams = formParams.append('status', <any>status) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -603,25 +597,25 @@ export class PetService {
const additionalMetadata = requestParameters.additionalMetadata; const additionalMetadata = requestParameters.additionalMetadata;
const file = requestParameters.file; const file = requestParameters.file;
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -631,36 +625,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data" if (localVarUseForm) {
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data localVarFormParams = new FormData();
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (additionalMetadata !== undefined) {
formParams = formParams.append('additionalMetadata', <any>additionalMetadata) as any || formParams;
}
if (file !== undefined) {
formParams = formParams.append('file', <any>file) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -115,22 +115,22 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -138,7 +138,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -156,30 +156,30 @@ export class StoreService {
public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>; public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>;
public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -187,7 +187,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -210,24 +210,24 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -235,7 +235,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -257,19 +257,19 @@ export class StoreService {
throw new Error('Required parameter body was null or undefined when calling placeOrder.'); throw new Error('Required parameter body was null or undefined when calling placeOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -278,11 +278,11 @@ export class StoreService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -291,7 +291,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -139,17 +139,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUser.'); throw new Error('Required parameter body was null or undefined when calling createUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -158,11 +158,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -171,7 +171,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -193,17 +193,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -212,11 +212,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -225,7 +225,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -247,17 +247,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -266,11 +266,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -279,7 +279,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -302,22 +302,22 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling deleteUser.'); throw new Error('Required parameter username was null or undefined when calling deleteUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -325,7 +325,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -347,24 +347,24 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling getUserByName.'); throw new Error('Required parameter username was null or undefined when calling getUserByName.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -372,7 +372,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -398,43 +398,43 @@ export class UserService {
throw new Error('Required parameter password was null or undefined when calling loginUser.'); throw new Error('Required parameter password was null or undefined when calling loginUser.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (username !== undefined && username !== null) { if (username !== undefined && username !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>username, 'username'); <any>username, 'username');
} }
if (password !== undefined && password !== null) { if (password !== undefined && password !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>password, 'password'); <any>password, 'password');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`, return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -451,22 +451,22 @@ export class UserService {
public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>;
public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -474,7 +474,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -501,17 +501,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling updateUser.'); throw new Error('Required parameter body was null or undefined when calling updateUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -520,11 +520,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -533,7 +533,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -112,24 +112,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling addPet.'); throw new Error('Required parameter body was null or undefined when calling addPet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -140,11 +140,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -153,7 +153,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -175,32 +175,32 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling deletePet.'); throw new Error('Required parameter petId was null or undefined when calling deletePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
if (apiKey !== undefined && apiKey !== null) { if (apiKey !== undefined && apiKey !== null) {
headers = headers.set('api_key', String(apiKey)); localVarHeaders = localVarHeaders.set('api_key', String(apiKey));
} }
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -208,7 +208,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -230,46 +230,46 @@ export class PetService {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (status) { if (status) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
status.join(COLLECTION_FORMATS['csv']), 'status'); status.join(COLLECTION_FORMATS['csv']), 'status');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -292,46 +292,46 @@ export class PetService {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (tags) { if (tags) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
tags.join(COLLECTION_FORMATS['csv']), 'tags'); tags.join(COLLECTION_FORMATS['csv']), 'tags');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,31 +353,31 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling getPetById.'); throw new Error('Required parameter petId was null or undefined when calling getPetById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -385,7 +385,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,24 +406,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling updatePet.'); throw new Error('Required parameter body was null or undefined when calling updatePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -434,11 +434,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -447,7 +447,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -470,24 +470,24 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -497,33 +497,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (name !== undefined) {
formParams = formParams.append('name', <any>name) as any || formParams;
}
if (status !== undefined) {
formParams = formParams.append('status', <any>status) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -546,25 +540,25 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); throw new Error('Required parameter petId was null or undefined when calling uploadFile.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -574,36 +568,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data" if (localVarUseForm) {
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data localVarFormParams = new FormData();
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (additionalMetadata !== undefined) {
formParams = formParams.append('additionalMetadata', <any>additionalMetadata) as any || formParams;
}
if (file !== undefined) {
formParams = formParams.append('file', <any>file) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,22 +99,22 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -122,7 +122,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -140,30 +140,30 @@ export class StoreService {
public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>; public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>;
public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -171,7 +171,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -193,24 +193,24 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -218,7 +218,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -239,19 +239,19 @@ export class StoreService {
throw new Error('Required parameter body was null or undefined when calling placeOrder.'); throw new Error('Required parameter body was null or undefined when calling placeOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -260,11 +260,11 @@ export class StoreService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -273,7 +273,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,17 +99,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUser.'); throw new Error('Required parameter body was null or undefined when calling createUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -118,11 +118,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -131,7 +131,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -152,17 +152,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -171,11 +171,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -184,7 +184,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -205,17 +205,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -224,11 +224,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -237,7 +237,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -259,22 +259,22 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling deleteUser.'); throw new Error('Required parameter username was null or undefined when calling deleteUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -282,7 +282,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -303,24 +303,24 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling getUserByName.'); throw new Error('Required parameter username was null or undefined when calling getUserByName.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -328,7 +328,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,43 +353,43 @@ export class UserService {
throw new Error('Required parameter password was null or undefined when calling loginUser.'); throw new Error('Required parameter password was null or undefined when calling loginUser.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (username !== undefined && username !== null) { if (username !== undefined && username !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>username, 'username'); <any>username, 'username');
} }
if (password !== undefined && password !== null) { if (password !== undefined && password !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>password, 'password'); <any>password, 'password');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`, return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,22 +406,22 @@ export class UserService {
public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>;
public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -429,7 +429,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -455,17 +455,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling updateUser.'); throw new Error('Required parameter body was null or undefined when calling updateUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -474,11 +474,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -487,7 +487,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -112,24 +112,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling addPet.'); throw new Error('Required parameter body was null or undefined when calling addPet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -140,11 +140,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -153,7 +153,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -175,32 +175,32 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling deletePet.'); throw new Error('Required parameter petId was null or undefined when calling deletePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
if (apiKey !== undefined && apiKey !== null) { if (apiKey !== undefined && apiKey !== null) {
headers = headers.set('api_key', String(apiKey)); localVarHeaders = localVarHeaders.set('api_key', String(apiKey));
} }
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -208,7 +208,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -230,46 +230,46 @@ export class PetService {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (status) { if (status) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
status.join(COLLECTION_FORMATS['csv']), 'status'); status.join(COLLECTION_FORMATS['csv']), 'status');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -292,46 +292,46 @@ export class PetService {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (tags) { if (tags) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
tags.join(COLLECTION_FORMATS['csv']), 'tags'); tags.join(COLLECTION_FORMATS['csv']), 'tags');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,31 +353,31 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling getPetById.'); throw new Error('Required parameter petId was null or undefined when calling getPetById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -385,7 +385,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,24 +406,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling updatePet.'); throw new Error('Required parameter body was null or undefined when calling updatePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -434,11 +434,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -447,7 +447,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -470,24 +470,24 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -497,33 +497,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (name !== undefined) {
formParams = formParams.append('name', <any>name) as any || formParams;
}
if (status !== undefined) {
formParams = formParams.append('status', <any>status) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -546,25 +540,25 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); throw new Error('Required parameter petId was null or undefined when calling uploadFile.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -574,36 +568,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data" if (localVarUseForm) {
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data localVarFormParams = new FormData();
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (additionalMetadata !== undefined) {
formParams = formParams.append('additionalMetadata', <any>additionalMetadata) as any || formParams;
}
if (file !== undefined) {
formParams = formParams.append('file', <any>file) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,22 +99,22 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -122,7 +122,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -140,30 +140,30 @@ export class StoreService {
public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>; public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>;
public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -171,7 +171,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -193,24 +193,24 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -218,7 +218,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -239,19 +239,19 @@ export class StoreService {
throw new Error('Required parameter body was null or undefined when calling placeOrder.'); throw new Error('Required parameter body was null or undefined when calling placeOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -260,11 +260,11 @@ export class StoreService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -273,7 +273,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,17 +99,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUser.'); throw new Error('Required parameter body was null or undefined when calling createUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -118,11 +118,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -131,7 +131,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -152,17 +152,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -171,11 +171,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -184,7 +184,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -205,17 +205,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -224,11 +224,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -237,7 +237,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -259,22 +259,22 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling deleteUser.'); throw new Error('Required parameter username was null or undefined when calling deleteUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -282,7 +282,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -303,24 +303,24 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling getUserByName.'); throw new Error('Required parameter username was null or undefined when calling getUserByName.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -328,7 +328,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,43 +353,43 @@ export class UserService {
throw new Error('Required parameter password was null or undefined when calling loginUser.'); throw new Error('Required parameter password was null or undefined when calling loginUser.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (username !== undefined && username !== null) { if (username !== undefined && username !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>username, 'username'); <any>username, 'username');
} }
if (password !== undefined && password !== null) { if (password !== undefined && password !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>password, 'password'); <any>password, 'password');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`, return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,22 +406,22 @@ export class UserService {
public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>;
public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -429,7 +429,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -455,17 +455,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling updateUser.'); throw new Error('Required parameter body was null or undefined when calling updateUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -474,11 +474,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -487,7 +487,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -112,24 +112,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling addPet.'); throw new Error('Required parameter body was null or undefined when calling addPet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -140,11 +140,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -153,7 +153,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -175,32 +175,32 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling deletePet.'); throw new Error('Required parameter petId was null or undefined when calling deletePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
if (apiKey !== undefined && apiKey !== null) { if (apiKey !== undefined && apiKey !== null) {
headers = headers.set('api_key', String(apiKey)); localVarHeaders = localVarHeaders.set('api_key', String(apiKey));
} }
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -208,7 +208,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -230,46 +230,46 @@ export class PetService {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (status) { if (status) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
status.join(COLLECTION_FORMATS['csv']), 'status'); status.join(COLLECTION_FORMATS['csv']), 'status');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -292,46 +292,46 @@ export class PetService {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (tags) { if (tags) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
tags.join(COLLECTION_FORMATS['csv']), 'tags'); tags.join(COLLECTION_FORMATS['csv']), 'tags');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,31 +353,31 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling getPetById.'); throw new Error('Required parameter petId was null or undefined when calling getPetById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -385,7 +385,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,24 +406,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling updatePet.'); throw new Error('Required parameter body was null or undefined when calling updatePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -434,11 +434,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -447,7 +447,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -470,24 +470,24 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -497,33 +497,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (name !== undefined) {
formParams = formParams.append('name', <any>name) as any || formParams;
}
if (status !== undefined) {
formParams = formParams.append('status', <any>status) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -546,25 +540,25 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); throw new Error('Required parameter petId was null or undefined when calling uploadFile.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -574,36 +568,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data" if (localVarUseForm) {
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data localVarFormParams = new FormData();
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (additionalMetadata !== undefined) {
formParams = formParams.append('additionalMetadata', <any>additionalMetadata) as any || formParams;
}
if (file !== undefined) {
formParams = formParams.append('file', <any>file) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,22 +99,22 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -122,7 +122,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -140,30 +140,30 @@ export class StoreService {
public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>; public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>;
public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -171,7 +171,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -193,24 +193,24 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -218,7 +218,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -239,19 +239,19 @@ export class StoreService {
throw new Error('Required parameter body was null or undefined when calling placeOrder.'); throw new Error('Required parameter body was null or undefined when calling placeOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -260,11 +260,11 @@ export class StoreService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -273,7 +273,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,17 +99,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUser.'); throw new Error('Required parameter body was null or undefined when calling createUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -118,11 +118,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -131,7 +131,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -152,17 +152,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -171,11 +171,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -184,7 +184,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -205,17 +205,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -224,11 +224,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -237,7 +237,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -259,22 +259,22 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling deleteUser.'); throw new Error('Required parameter username was null or undefined when calling deleteUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -282,7 +282,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -303,24 +303,24 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling getUserByName.'); throw new Error('Required parameter username was null or undefined when calling getUserByName.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -328,7 +328,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,43 +353,43 @@ export class UserService {
throw new Error('Required parameter password was null or undefined when calling loginUser.'); throw new Error('Required parameter password was null or undefined when calling loginUser.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (username !== undefined && username !== null) { if (username !== undefined && username !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>username, 'username'); <any>username, 'username');
} }
if (password !== undefined && password !== null) { if (password !== undefined && password !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>password, 'password'); <any>password, 'password');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`, return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,22 +406,22 @@ export class UserService {
public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>;
public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -429,7 +429,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -455,17 +455,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling updateUser.'); throw new Error('Required parameter body was null or undefined when calling updateUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -474,11 +474,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -487,7 +487,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -112,24 +112,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling addPet.'); throw new Error('Required parameter body was null or undefined when calling addPet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -140,11 +140,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -153,7 +153,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -175,32 +175,32 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling deletePet.'); throw new Error('Required parameter petId was null or undefined when calling deletePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
if (apiKey !== undefined && apiKey !== null) { if (apiKey !== undefined && apiKey !== null) {
headers = headers.set('api_key', String(apiKey)); localVarHeaders = localVarHeaders.set('api_key', String(apiKey));
} }
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -208,7 +208,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -230,46 +230,46 @@ export class PetService {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (status) { if (status) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
status.join(COLLECTION_FORMATS['csv']), 'status'); status.join(COLLECTION_FORMATS['csv']), 'status');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -292,46 +292,46 @@ export class PetService {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (tags) { if (tags) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
tags.join(COLLECTION_FORMATS['csv']), 'tags'); tags.join(COLLECTION_FORMATS['csv']), 'tags');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,31 +353,31 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling getPetById.'); throw new Error('Required parameter petId was null or undefined when calling getPetById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -385,7 +385,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,24 +406,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling updatePet.'); throw new Error('Required parameter body was null or undefined when calling updatePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -434,11 +434,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -447,7 +447,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -470,24 +470,24 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -497,33 +497,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (name !== undefined) {
formParams = formParams.append('name', <any>name) as any || formParams;
}
if (status !== undefined) {
formParams = formParams.append('status', <any>status) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -546,25 +540,25 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); throw new Error('Required parameter petId was null or undefined when calling uploadFile.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -574,36 +568,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data" if (localVarUseForm) {
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data localVarFormParams = new FormData();
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (additionalMetadata !== undefined) {
formParams = formParams.append('additionalMetadata', <any>additionalMetadata) as any || formParams;
}
if (file !== undefined) {
formParams = formParams.append('file', <any>file) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,22 +99,22 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -122,7 +122,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -140,30 +140,30 @@ export class StoreService {
public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>; public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>;
public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -171,7 +171,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -193,24 +193,24 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -218,7 +218,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -239,19 +239,19 @@ export class StoreService {
throw new Error('Required parameter body was null or undefined when calling placeOrder.'); throw new Error('Required parameter body was null or undefined when calling placeOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -260,11 +260,11 @@ export class StoreService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -273,7 +273,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,17 +99,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUser.'); throw new Error('Required parameter body was null or undefined when calling createUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -118,11 +118,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -131,7 +131,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -152,17 +152,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -171,11 +171,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -184,7 +184,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -205,17 +205,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -224,11 +224,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -237,7 +237,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -259,22 +259,22 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling deleteUser.'); throw new Error('Required parameter username was null or undefined when calling deleteUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -282,7 +282,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -303,24 +303,24 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling getUserByName.'); throw new Error('Required parameter username was null or undefined when calling getUserByName.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -328,7 +328,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,43 +353,43 @@ export class UserService {
throw new Error('Required parameter password was null or undefined when calling loginUser.'); throw new Error('Required parameter password was null or undefined when calling loginUser.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (username !== undefined && username !== null) { if (username !== undefined && username !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>username, 'username'); <any>username, 'username');
} }
if (password !== undefined && password !== null) { if (password !== undefined && password !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>password, 'password'); <any>password, 'password');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`, return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,22 +406,22 @@ export class UserService {
public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>;
public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -429,7 +429,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -455,17 +455,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling updateUser.'); throw new Error('Required parameter body was null or undefined when calling updateUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -474,11 +474,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -487,7 +487,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -112,24 +112,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling addPet.'); throw new Error('Required parameter body was null or undefined when calling addPet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -140,11 +140,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -153,7 +153,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -175,32 +175,32 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling deletePet.'); throw new Error('Required parameter petId was null or undefined when calling deletePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
if (apiKey !== undefined && apiKey !== null) { if (apiKey !== undefined && apiKey !== null) {
headers = headers.set('api_key', String(apiKey)); localVarHeaders = localVarHeaders.set('api_key', String(apiKey));
} }
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -208,7 +208,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -230,46 +230,46 @@ export class PetService {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (status) { if (status) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
status.join(COLLECTION_FORMATS['csv']), 'status'); status.join(COLLECTION_FORMATS['csv']), 'status');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -292,46 +292,46 @@ export class PetService {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (tags) { if (tags) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
tags.join(COLLECTION_FORMATS['csv']), 'tags'); tags.join(COLLECTION_FORMATS['csv']), 'tags');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`, return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,31 +353,31 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling getPetById.'); throw new Error('Required parameter petId was null or undefined when calling getPetById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -385,7 +385,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,24 +406,24 @@ export class PetService {
throw new Error('Required parameter body was null or undefined when calling updatePet.'); throw new Error('Required parameter body was null or undefined when calling updatePet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -434,11 +434,11 @@ export class PetService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -447,7 +447,7 @@ export class PetService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -470,24 +470,24 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -497,33 +497,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (name !== undefined) {
formParams = formParams.append('name', <any>name) as any || formParams;
}
if (status !== undefined) {
formParams = formParams.append('status', <any>status) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, return this.httpClient.post<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -546,25 +540,25 @@ export class PetService {
throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); throw new Error('Required parameter petId was null or undefined when calling uploadFile.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (petstore_auth) required // authentication (petstore_auth) required
credential = this.configuration.lookupCredential('petstore_auth'); localVarCredential = this.configuration.lookupCredential('petstore_auth');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -574,36 +568,27 @@ export class PetService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data" if (localVarUseForm) {
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data localVarFormParams = new FormData();
useForm = canConsumeForm;
if (useForm) {
formParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (additionalMetadata !== undefined) {
formParams = formParams.append('additionalMetadata', <any>additionalMetadata) as any || formParams;
}
if (file !== undefined) {
formParams = formParams.append('file', <any>file) as any || formParams;
}
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, return this.httpClient.post<ApiResponse>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,22 +99,22 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -122,7 +122,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -140,30 +140,30 @@ export class StoreService {
public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>; public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<{ [key: string]: number; }>>;
public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (api_key) required // authentication (api_key) required
credential = this.configuration.lookupCredential('api_key'); localVarCredential = this.configuration.lookupCredential('api_key');
if (credential) { if (localVarCredential) {
headers = headers.set('api_key', credential); localVarHeaders = localVarHeaders.set('api_key', localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -171,7 +171,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -193,24 +193,24 @@ export class StoreService {
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -218,7 +218,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -239,19 +239,19 @@ export class StoreService {
throw new Error('Required parameter body was null or undefined when calling placeOrder.'); throw new Error('Required parameter body was null or undefined when calling placeOrder.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -260,11 +260,11 @@ export class StoreService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -273,7 +273,7 @@ export class StoreService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View File

@ -99,17 +99,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUser.'); throw new Error('Required parameter body was null or undefined when calling createUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -118,11 +118,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -131,7 +131,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -152,17 +152,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -171,11 +171,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -184,7 +184,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -205,17 +205,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -224,11 +224,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -237,7 +237,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -259,22 +259,22 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling deleteUser.'); throw new Error('Required parameter username was null or undefined when calling deleteUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -282,7 +282,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -303,24 +303,24 @@ export class UserService {
throw new Error('Required parameter username was null or undefined when calling getUserByName.'); throw new Error('Required parameter username was null or undefined when calling getUserByName.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -328,7 +328,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -353,43 +353,43 @@ export class UserService {
throw new Error('Required parameter password was null or undefined when calling loginUser.'); throw new Error('Required parameter password was null or undefined when calling loginUser.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (username !== undefined && username !== null) { if (username !== undefined && username !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>username, 'username'); <any>username, 'username');
} }
if (password !== undefined && password !== null) { if (password !== undefined && password !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>password, 'password'); <any>password, 'password');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/xml', 'application/xml',
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`, return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{ {
params: queryParameters, params: localVarQueryParameters,
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -406,22 +406,22 @@ export class UserService {
public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>;
public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -429,7 +429,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -455,17 +455,17 @@ export class UserService {
throw new Error('Required parameter body was null or undefined when calling updateUser.'); throw new Error('Required parameter body was null or undefined when calling updateUser.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@ -474,11 +474,11 @@ export class UserService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType_: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text'; responseType_ = 'text';
} }
@ -487,7 +487,7 @@ export class UserService {
{ {
responseType: <any>responseType_, responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, localVarHeaders: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }