mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 20:50:55 +00:00
Misc typescript Angular code generation improvements (#7898)
use const instead of let when possible add missing semi-colon replace " with '
This commit is contained in:
parent
40d5d09905
commit
bdd2c2a4ee
@ -22,7 +22,7 @@ export class ApiModule {
|
|||||||
return {
|
return {
|
||||||
ngModule: ApiModule,
|
ngModule: ApiModule,
|
||||||
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
|
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor( @Optional() @SkipSelf() parentModule: ApiModule,
|
constructor( @Optional() @SkipSelf() parentModule: ApiModule,
|
||||||
|
@ -64,7 +64,7 @@ export class {{classname}} {
|
|||||||
*/
|
*/
|
||||||
private canConsumeForm(consumes: string[]): boolean {
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
const form = 'multipart/form-data';
|
const form = 'multipart/form-data';
|
||||||
for (let consume of consumes) {
|
for (const consume of consumes) {
|
||||||
if (form === consume) {
|
if (form === consume) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -199,7 +199,7 @@ export class {{classname}} {
|
|||||||
{{/isBasic}}
|
{{/isBasic}}
|
||||||
{{#isOAuth}}
|
{{#isOAuth}}
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
{{#useHttpClient}}headers = {{/useHttpClient}}headers.set('Authorization', 'Bearer ' + accessToken);
|
{{#useHttpClient}}headers = {{/useHttpClient}}headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -213,30 +213,30 @@ export class {{classname}} {
|
|||||||
'{{{mediaType}}}'{{#hasMore}},{{/hasMore}}
|
'{{{mediaType}}}'{{#hasMore}},{{/hasMore}}
|
||||||
{{/produces}}
|
{{/produces}}
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
{{^useHttpClient}}
|
{{^useHttpClient}}
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
{{/useHttpClient}}
|
{{/useHttpClient}}
|
||||||
{{#useHttpClient}}
|
{{#useHttpClient}}
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
{{/useHttpClient}}
|
{{/useHttpClient}}
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
{{#consumes}}
|
{{#consumes}}
|
||||||
'{{{mediaType}}}'{{#hasMore}},{{/hasMore}}
|
'{{{mediaType}}}'{{#hasMore}},{{/hasMore}}
|
||||||
{{/consumes}}
|
{{/consumes}}
|
||||||
];
|
];
|
||||||
{{#bodyParam}}
|
{{#bodyParam}}
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
{{^useHttpClient}}
|
{{^useHttpClient}}
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
{{/useHttpClient}}
|
{{/useHttpClient}}
|
||||||
{{#useHttpClient}}
|
{{#useHttpClient}}
|
||||||
headers = headers.set("Content-Type", httpContentTypeSelected);
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||||
{{/useHttpClient}}
|
{{/useHttpClient}}
|
||||||
}
|
}
|
||||||
{{/bodyParam}}
|
{{/bodyParam}}
|
||||||
|
@ -6,4 +6,4 @@ export const {{classname}} = {
|
|||||||
{{name}}: {{{value}}} as {{classname}}{{^-last}},{{/-last}}
|
{{name}}: {{{value}}} as {{classname}}{{^-last}},{{/-last}}
|
||||||
{{/enumVars}}
|
{{/enumVars}}
|
||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
}
|
};
|
@ -10,7 +10,7 @@ export namespace {{classname}} {
|
|||||||
{{name}}: {{{value}}} as {{enumName}}{{^-last}},{{/-last}}
|
{{name}}: {{{value}}} as {{enumName}}{{^-last}},{{/-last}}
|
||||||
{{/enumVars}}
|
{{/enumVars}}
|
||||||
{{/allowableValues}}
|
{{/allowableValues}}
|
||||||
}
|
};
|
||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
}{{/hasEnums}}
|
}{{/hasEnums}}
|
@ -21,7 +21,7 @@ export class ApiModule {
|
|||||||
return {
|
return {
|
||||||
ngModule: ApiModule,
|
ngModule: ApiModule,
|
||||||
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
|
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor( @Optional() @SkipSelf() parentModule: ApiModule,
|
constructor( @Optional() @SkipSelf() parentModule: ApiModule,
|
||||||
|
@ -50,7 +50,7 @@ export class PetService {
|
|||||||
*/
|
*/
|
||||||
private canConsumeForm(consumes: string[]): boolean {
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
const form = 'multipart/form-data';
|
const form = 'multipart/form-data';
|
||||||
for (let consume of consumes) {
|
for (const consume of consumes) {
|
||||||
if (form === consume) {
|
if (form === consume) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -207,7 +207,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -218,17 +218,17 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'application/json',
|
'application/json',
|
||||||
'application/xml'
|
'application/xml'
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -266,7 +266,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -277,13 +277,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -319,7 +319,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -330,13 +330,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -373,7 +373,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -384,13 +384,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -430,13 +430,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -467,7 +467,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -478,17 +478,17 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'application/json',
|
'application/json',
|
||||||
'application/xml'
|
'application/xml'
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -524,7 +524,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -535,13 +535,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'application/x-www-form-urlencoded'
|
'application/x-www-form-urlencoded'
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -598,7 +598,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -608,13 +608,13 @@ export class PetService {
|
|||||||
let httpHeaderAccepts: string[] = [
|
let httpHeaderAccepts: string[] = [
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'multipart/form-data'
|
'multipart/form-data'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ export class StoreService {
|
|||||||
*/
|
*/
|
||||||
private canConsumeForm(consumes: string[]): boolean {
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
const form = 'multipart/form-data';
|
const form = 'multipart/form-data';
|
||||||
for (let consume of consumes) {
|
for (const consume of consumes) {
|
||||||
if (form === consume) {
|
if (form === consume) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -139,13 +139,13 @@ export class StoreService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -179,13 +179,13 @@ export class StoreService {
|
|||||||
let httpHeaderAccepts: string[] = [
|
let httpHeaderAccepts: string[] = [
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -219,13 +219,13 @@ export class StoreService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -259,15 +259,15 @@ export class StoreService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ export class UserService {
|
|||||||
*/
|
*/
|
||||||
private canConsumeForm(consumes: string[]): boolean {
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
const form = 'multipart/form-data';
|
const form = 'multipart/form-data';
|
||||||
for (let consume of consumes) {
|
for (const consume of consumes) {
|
||||||
if (form === consume) {
|
if (form === consume) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ export class UserService {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary Get user by user name
|
* @summary Get user by user name
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
*/
|
*/
|
||||||
public getUserByName(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<User> {
|
public getUserByName(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<User> {
|
||||||
return this.getUserByNameWithHttpInfo(username, extraHttpRequestParams)
|
return this.getUserByNameWithHttpInfo(username, extraHttpRequestParams)
|
||||||
@ -205,15 +205,15 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -250,15 +250,15 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -295,15 +295,15 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -340,13 +340,13 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -365,7 +365,7 @@ export class UserService {
|
|||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
*
|
*
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
public getUserByNameWithHttpInfo(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
|
public getUserByNameWithHttpInfo(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
|
||||||
@ -380,13 +380,13 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -432,13 +432,13 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -469,13 +469,13 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -513,15 +513,15 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
|
@ -31,5 +31,5 @@ export namespace Order {
|
|||||||
Placed: 'placed' as StatusEnum,
|
Placed: 'placed' as StatusEnum,
|
||||||
Approved: 'approved' as StatusEnum,
|
Approved: 'approved' as StatusEnum,
|
||||||
Delivered: 'delivered' as StatusEnum
|
Delivered: 'delivered' as StatusEnum
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
@ -33,5 +33,5 @@ export namespace Pet {
|
|||||||
Available: 'available' as StatusEnum,
|
Available: 'available' as StatusEnum,
|
||||||
Pending: 'pending' as StatusEnum,
|
Pending: 'pending' as StatusEnum,
|
||||||
Sold: 'sold' as StatusEnum
|
Sold: 'sold' as StatusEnum
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ export class ApiModule {
|
|||||||
return {
|
return {
|
||||||
ngModule: ApiModule,
|
ngModule: ApiModule,
|
||||||
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
|
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor( @Optional() @SkipSelf() parentModule: ApiModule,
|
constructor( @Optional() @SkipSelf() parentModule: ApiModule,
|
||||||
|
@ -50,7 +50,7 @@ export class PetService {
|
|||||||
*/
|
*/
|
||||||
private canConsumeForm(consumes: string[]): boolean {
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
const form = 'multipart/form-data';
|
const form = 'multipart/form-data';
|
||||||
for (let consume of consumes) {
|
for (const consume of consumes) {
|
||||||
if (form === consume) {
|
if (form === consume) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -207,7 +207,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -218,17 +218,17 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'application/json',
|
'application/json',
|
||||||
'application/xml'
|
'application/xml'
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -266,7 +266,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -277,13 +277,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -319,7 +319,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -330,13 +330,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -373,7 +373,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -384,13 +384,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -430,13 +430,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -467,7 +467,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -478,17 +478,17 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'application/json',
|
'application/json',
|
||||||
'application/xml'
|
'application/xml'
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -524,7 +524,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -535,13 +535,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'application/x-www-form-urlencoded'
|
'application/x-www-form-urlencoded'
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -598,7 +598,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -608,13 +608,13 @@ export class PetService {
|
|||||||
let httpHeaderAccepts: string[] = [
|
let httpHeaderAccepts: string[] = [
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'multipart/form-data'
|
'multipart/form-data'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ export class StoreService {
|
|||||||
*/
|
*/
|
||||||
private canConsumeForm(consumes: string[]): boolean {
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
const form = 'multipart/form-data';
|
const form = 'multipart/form-data';
|
||||||
for (let consume of consumes) {
|
for (const consume of consumes) {
|
||||||
if (form === consume) {
|
if (form === consume) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -139,13 +139,13 @@ export class StoreService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -179,13 +179,13 @@ export class StoreService {
|
|||||||
let httpHeaderAccepts: string[] = [
|
let httpHeaderAccepts: string[] = [
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -219,13 +219,13 @@ export class StoreService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -259,15 +259,15 @@ export class StoreService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ export class UserService {
|
|||||||
*/
|
*/
|
||||||
private canConsumeForm(consumes: string[]): boolean {
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
const form = 'multipart/form-data';
|
const form = 'multipart/form-data';
|
||||||
for (let consume of consumes) {
|
for (const consume of consumes) {
|
||||||
if (form === consume) {
|
if (form === consume) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ export class UserService {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary Get user by user name
|
* @summary Get user by user name
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
*/
|
*/
|
||||||
public getUserByName(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<User> {
|
public getUserByName(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<User> {
|
||||||
return this.getUserByNameWithHttpInfo(username, extraHttpRequestParams)
|
return this.getUserByNameWithHttpInfo(username, extraHttpRequestParams)
|
||||||
@ -205,15 +205,15 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -250,15 +250,15 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -295,15 +295,15 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -340,13 +340,13 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -365,7 +365,7 @@ export class UserService {
|
|||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
*
|
*
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
public getUserByNameWithHttpInfo(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
|
public getUserByNameWithHttpInfo(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
|
||||||
@ -380,13 +380,13 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -432,13 +432,13 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -469,13 +469,13 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -513,15 +513,15 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
|
@ -31,5 +31,5 @@ export namespace Order {
|
|||||||
Placed: 'placed' as StatusEnum,
|
Placed: 'placed' as StatusEnum,
|
||||||
Approved: 'approved' as StatusEnum,
|
Approved: 'approved' as StatusEnum,
|
||||||
Delivered: 'delivered' as StatusEnum
|
Delivered: 'delivered' as StatusEnum
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
@ -33,5 +33,5 @@ export namespace Pet {
|
|||||||
Available: 'available' as StatusEnum,
|
Available: 'available' as StatusEnum,
|
||||||
Pending: 'pending' as StatusEnum,
|
Pending: 'pending' as StatusEnum,
|
||||||
Sold: 'sold' as StatusEnum
|
Sold: 'sold' as StatusEnum
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ export class ApiModule {
|
|||||||
return {
|
return {
|
||||||
ngModule: ApiModule,
|
ngModule: ApiModule,
|
||||||
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
|
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor( @Optional() @SkipSelf() parentModule: ApiModule,
|
constructor( @Optional() @SkipSelf() parentModule: ApiModule,
|
||||||
|
@ -51,7 +51,7 @@ export class PetService implements PetServiceInterface {
|
|||||||
*/
|
*/
|
||||||
private canConsumeForm(consumes: string[]): boolean {
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
const form = 'multipart/form-data';
|
const form = 'multipart/form-data';
|
||||||
for (let consume of consumes) {
|
for (const consume of consumes) {
|
||||||
if (form === consume) {
|
if (form === consume) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -208,7 +208,7 @@ export class PetService implements PetServiceInterface {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -219,17 +219,17 @@ export class PetService implements PetServiceInterface {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'application/json',
|
'application/json',
|
||||||
'application/xml'
|
'application/xml'
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -267,7 +267,7 @@ export class PetService implements PetServiceInterface {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -278,13 +278,13 @@ export class PetService implements PetServiceInterface {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -320,7 +320,7 @@ export class PetService implements PetServiceInterface {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -331,13 +331,13 @@ export class PetService implements PetServiceInterface {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -374,7 +374,7 @@ export class PetService implements PetServiceInterface {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -385,13 +385,13 @@ export class PetService implements PetServiceInterface {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -431,13 +431,13 @@ export class PetService implements PetServiceInterface {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -468,7 +468,7 @@ export class PetService implements PetServiceInterface {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -479,17 +479,17 @@ export class PetService implements PetServiceInterface {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'application/json',
|
'application/json',
|
||||||
'application/xml'
|
'application/xml'
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -525,7 +525,7 @@ export class PetService implements PetServiceInterface {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -536,13 +536,13 @@ export class PetService implements PetServiceInterface {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'application/x-www-form-urlencoded'
|
'application/x-www-form-urlencoded'
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -599,7 +599,7 @@ export class PetService implements PetServiceInterface {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -609,13 +609,13 @@ export class PetService implements PetServiceInterface {
|
|||||||
let httpHeaderAccepts: string[] = [
|
let httpHeaderAccepts: string[] = [
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'multipart/form-data'
|
'multipart/form-data'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ export class StoreService implements StoreServiceInterface {
|
|||||||
*/
|
*/
|
||||||
private canConsumeForm(consumes: string[]): boolean {
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
const form = 'multipart/form-data';
|
const form = 'multipart/form-data';
|
||||||
for (let consume of consumes) {
|
for (const consume of consumes) {
|
||||||
if (form === consume) {
|
if (form === consume) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -140,13 +140,13 @@ export class StoreService implements StoreServiceInterface {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -180,13 +180,13 @@ export class StoreService implements StoreServiceInterface {
|
|||||||
let httpHeaderAccepts: string[] = [
|
let httpHeaderAccepts: string[] = [
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -220,13 +220,13 @@ export class StoreService implements StoreServiceInterface {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -260,15 +260,15 @@ export class StoreService implements StoreServiceInterface {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ export class UserService implements UserServiceInterface {
|
|||||||
*/
|
*/
|
||||||
private canConsumeForm(consumes: string[]): boolean {
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
const form = 'multipart/form-data';
|
const form = 'multipart/form-data';
|
||||||
for (let consume of consumes) {
|
for (const consume of consumes) {
|
||||||
if (form === consume) {
|
if (form === consume) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -125,7 +125,7 @@ export class UserService implements UserServiceInterface {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary Get user by user name
|
* @summary Get user by user name
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
*/
|
*/
|
||||||
public getUserByName(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<User> {
|
public getUserByName(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<User> {
|
||||||
return this.getUserByNameWithHttpInfo(username, extraHttpRequestParams)
|
return this.getUserByNameWithHttpInfo(username, extraHttpRequestParams)
|
||||||
@ -206,15 +206,15 @@ export class UserService implements UserServiceInterface {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -251,15 +251,15 @@ export class UserService implements UserServiceInterface {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -296,15 +296,15 @@ export class UserService implements UserServiceInterface {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -341,13 +341,13 @@ export class UserService implements UserServiceInterface {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -366,7 +366,7 @@ export class UserService implements UserServiceInterface {
|
|||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
*
|
*
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
public getUserByNameWithHttpInfo(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
|
public getUserByNameWithHttpInfo(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
|
||||||
@ -381,13 +381,13 @@ export class UserService implements UserServiceInterface {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -433,13 +433,13 @@ export class UserService implements UserServiceInterface {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -470,13 +470,13 @@ export class UserService implements UserServiceInterface {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -514,15 +514,15 @@ export class UserService implements UserServiceInterface {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ export interface UserServiceInterface {
|
|||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
*
|
*
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
*/
|
*/
|
||||||
getUserByName(username: string, extraHttpRequestParams?: any): Observable<User>;
|
getUserByName(username: string, extraHttpRequestParams?: any): Observable<User>;
|
||||||
|
|
||||||
|
@ -31,5 +31,5 @@ export namespace Order {
|
|||||||
Placed: 'placed' as StatusEnum,
|
Placed: 'placed' as StatusEnum,
|
||||||
Approved: 'approved' as StatusEnum,
|
Approved: 'approved' as StatusEnum,
|
||||||
Delivered: 'delivered' as StatusEnum
|
Delivered: 'delivered' as StatusEnum
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
@ -33,5 +33,5 @@ export namespace Pet {
|
|||||||
Available: 'available' as StatusEnum,
|
Available: 'available' as StatusEnum,
|
||||||
Pending: 'pending' as StatusEnum,
|
Pending: 'pending' as StatusEnum,
|
||||||
Sold: 'sold' as StatusEnum
|
Sold: 'sold' as StatusEnum
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ export class ApiModule {
|
|||||||
return {
|
return {
|
||||||
ngModule: ApiModule,
|
ngModule: ApiModule,
|
||||||
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
|
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor( @Optional() @SkipSelf() parentModule: ApiModule,
|
constructor( @Optional() @SkipSelf() parentModule: ApiModule,
|
||||||
|
@ -48,7 +48,7 @@ export class PetService {
|
|||||||
*/
|
*/
|
||||||
private canConsumeForm(consumes: string[]): boolean {
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
const form = 'multipart/form-data';
|
const form = 'multipart/form-data';
|
||||||
for (let consume of consumes) {
|
for (const consume of consumes) {
|
||||||
if (form === consume) {
|
if (form === consume) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -76,7 +76,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -87,19 +87,19 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'application/json',
|
'application/json',
|
||||||
'application/xml'
|
'application/xml'
|
||||||
];
|
];
|
||||||
let 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);
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.httpClient.post<any>(`${this.basePath}/pet`,
|
return this.httpClient.post<any>(`${this.basePath}/pet`,
|
||||||
@ -136,7 +136,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -147,13 +147,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
return this.httpClient.delete<any>(`${this.basePath}/pet/${encodeURIComponent(String(petId))}`,
|
return this.httpClient.delete<any>(`${this.basePath}/pet/${encodeURIComponent(String(petId))}`,
|
||||||
@ -190,7 +190,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -201,13 +201,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
return this.httpClient.get<Array<Pet>>(`${this.basePath}/pet/findByStatus`,
|
return this.httpClient.get<Array<Pet>>(`${this.basePath}/pet/findByStatus`,
|
||||||
@ -245,7 +245,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -256,13 +256,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
return this.httpClient.get<Array<Pet>>(`${this.basePath}/pet/findByTags`,
|
return this.httpClient.get<Array<Pet>>(`${this.basePath}/pet/findByTags`,
|
||||||
@ -303,13 +303,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
return this.httpClient.get<Pet>(`${this.basePath}/pet/${encodeURIComponent(String(petId))}`,
|
return this.httpClient.get<Pet>(`${this.basePath}/pet/${encodeURIComponent(String(petId))}`,
|
||||||
@ -341,7 +341,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -352,19 +352,19 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'application/json',
|
'application/json',
|
||||||
'application/xml'
|
'application/xml'
|
||||||
];
|
];
|
||||||
let 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);
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.httpClient.put<any>(`${this.basePath}/pet`,
|
return this.httpClient.put<any>(`${this.basePath}/pet`,
|
||||||
@ -399,7 +399,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -410,13 +410,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'application/x-www-form-urlencoded'
|
'application/x-www-form-urlencoded'
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -470,7 +470,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -480,13 +480,13 @@ export class PetService {
|
|||||||
let httpHeaderAccepts: string[] = [
|
let httpHeaderAccepts: string[] = [
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'multipart/form-data'
|
'multipart/form-data'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ export class StoreService {
|
|||||||
*/
|
*/
|
||||||
private canConsumeForm(consumes: string[]): boolean {
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
const form = 'multipart/form-data';
|
const form = 'multipart/form-data';
|
||||||
for (let consume of consumes) {
|
for (const consume of consumes) {
|
||||||
if (form === consume) {
|
if (form === consume) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -78,13 +78,13 @@ export class StoreService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
return this.httpClient.delete<any>(`${this.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
|
return this.httpClient.delete<any>(`${this.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
|
||||||
@ -119,13 +119,13 @@ export class StoreService {
|
|||||||
let httpHeaderAccepts: string[] = [
|
let httpHeaderAccepts: string[] = [
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
return this.httpClient.get<{ [key: string]: number; }>(`${this.basePath}/store/inventory`,
|
return this.httpClient.get<{ [key: string]: number; }>(`${this.basePath}/store/inventory`,
|
||||||
@ -160,13 +160,13 @@ export class StoreService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
return this.httpClient.get<Order>(`${this.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
|
return this.httpClient.get<Order>(`${this.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
|
||||||
@ -201,17 +201,17 @@ export class StoreService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let 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);
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.httpClient.post<Order>(`${this.basePath}/store/order`,
|
return this.httpClient.post<Order>(`${this.basePath}/store/order`,
|
||||||
|
@ -47,7 +47,7 @@ export class UserService {
|
|||||||
*/
|
*/
|
||||||
private canConsumeForm(consumes: string[]): boolean {
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
const form = 'multipart/form-data';
|
const form = 'multipart/form-data';
|
||||||
for (let consume of consumes) {
|
for (const consume of consumes) {
|
||||||
if (form === consume) {
|
if (form === consume) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -78,17 +78,17 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let 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);
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.httpClient.post<any>(`${this.basePath}/user`,
|
return this.httpClient.post<any>(`${this.basePath}/user`,
|
||||||
@ -124,17 +124,17 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let 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);
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.httpClient.post<any>(`${this.basePath}/user/createWithArray`,
|
return this.httpClient.post<any>(`${this.basePath}/user/createWithArray`,
|
||||||
@ -170,17 +170,17 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let 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);
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.httpClient.post<any>(`${this.basePath}/user/createWithList`,
|
return this.httpClient.post<any>(`${this.basePath}/user/createWithList`,
|
||||||
@ -216,13 +216,13 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
return this.httpClient.delete<any>(`${this.basePath}/user/${encodeURIComponent(String(username))}`,
|
return this.httpClient.delete<any>(`${this.basePath}/user/${encodeURIComponent(String(username))}`,
|
||||||
@ -238,7 +238,7 @@ export class UserService {
|
|||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
*
|
*
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
* @param reportProgress flag to report request and response progress.
|
* @param reportProgress flag to report request and response progress.
|
||||||
*/
|
*/
|
||||||
@ -257,13 +257,13 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
return this.httpClient.get<User>(`${this.basePath}/user/${encodeURIComponent(String(username))}`,
|
return this.httpClient.get<User>(`${this.basePath}/user/${encodeURIComponent(String(username))}`,
|
||||||
@ -310,13 +310,13 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
return this.httpClient.get<string>(`${this.basePath}/user/login`,
|
return this.httpClient.get<string>(`${this.basePath}/user/login`,
|
||||||
@ -348,13 +348,13 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
return this.httpClient.get<any>(`${this.basePath}/user/logout`,
|
return this.httpClient.get<any>(`${this.basePath}/user/logout`,
|
||||||
@ -393,17 +393,17 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers = headers.set("Accept", httpHeaderAcceptSelected);
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let 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);
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.httpClient.put<any>(`${this.basePath}/user/${encodeURIComponent(String(username))}`,
|
return this.httpClient.put<any>(`${this.basePath}/user/${encodeURIComponent(String(username))}`,
|
||||||
|
@ -31,5 +31,5 @@ export namespace Order {
|
|||||||
Placed: 'placed' as StatusEnum,
|
Placed: 'placed' as StatusEnum,
|
||||||
Approved: 'approved' as StatusEnum,
|
Approved: 'approved' as StatusEnum,
|
||||||
Delivered: 'delivered' as StatusEnum
|
Delivered: 'delivered' as StatusEnum
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
@ -33,5 +33,5 @@ export namespace Pet {
|
|||||||
Available: 'available' as StatusEnum,
|
Available: 'available' as StatusEnum,
|
||||||
Pending: 'pending' as StatusEnum,
|
Pending: 'pending' as StatusEnum,
|
||||||
Sold: 'sold' as StatusEnum
|
Sold: 'sold' as StatusEnum
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ export class ApiModule {
|
|||||||
return {
|
return {
|
||||||
ngModule: ApiModule,
|
ngModule: ApiModule,
|
||||||
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
|
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor( @Optional() @SkipSelf() parentModule: ApiModule,
|
constructor( @Optional() @SkipSelf() parentModule: ApiModule,
|
||||||
|
@ -50,7 +50,7 @@ export class PetService {
|
|||||||
*/
|
*/
|
||||||
private canConsumeForm(consumes: string[]): boolean {
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
const form = 'multipart/form-data';
|
const form = 'multipart/form-data';
|
||||||
for (let consume of consumes) {
|
for (const consume of consumes) {
|
||||||
if (form === consume) {
|
if (form === consume) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -207,7 +207,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -218,17 +218,17 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'application/json',
|
'application/json',
|
||||||
'application/xml'
|
'application/xml'
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -266,7 +266,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -277,13 +277,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -319,7 +319,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -330,13 +330,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -373,7 +373,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -384,13 +384,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -430,13 +430,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -467,7 +467,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -478,17 +478,17 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'application/json',
|
'application/json',
|
||||||
'application/xml'
|
'application/xml'
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -524,7 +524,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -535,13 +535,13 @@ export class PetService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'application/x-www-form-urlencoded'
|
'application/x-www-form-urlencoded'
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -598,7 +598,7 @@ export class PetService {
|
|||||||
|
|
||||||
// authentication (petstore_auth) required
|
// authentication (petstore_auth) required
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
? this.configuration.accessToken()
|
? this.configuration.accessToken()
|
||||||
: this.configuration.accessToken;
|
: this.configuration.accessToken;
|
||||||
headers.set('Authorization', 'Bearer ' + accessToken);
|
headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
@ -608,13 +608,13 @@ export class PetService {
|
|||||||
let httpHeaderAccepts: string[] = [
|
let httpHeaderAccepts: string[] = [
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
'multipart/form-data'
|
'multipart/form-data'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ export class StoreService {
|
|||||||
*/
|
*/
|
||||||
private canConsumeForm(consumes: string[]): boolean {
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
const form = 'multipart/form-data';
|
const form = 'multipart/form-data';
|
||||||
for (let consume of consumes) {
|
for (const consume of consumes) {
|
||||||
if (form === consume) {
|
if (form === consume) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -139,13 +139,13 @@ export class StoreService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -179,13 +179,13 @@ export class StoreService {
|
|||||||
let httpHeaderAccepts: string[] = [
|
let httpHeaderAccepts: string[] = [
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -219,13 +219,13 @@ export class StoreService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -259,15 +259,15 @@ export class StoreService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ export class UserService {
|
|||||||
*/
|
*/
|
||||||
private canConsumeForm(consumes: string[]): boolean {
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
const form = 'multipart/form-data';
|
const form = 'multipart/form-data';
|
||||||
for (let consume of consumes) {
|
for (const consume of consumes) {
|
||||||
if (form === consume) {
|
if (form === consume) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ export class UserService {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary Get user by user name
|
* @summary Get user by user name
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
*/
|
*/
|
||||||
public getUserByName(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<User> {
|
public getUserByName(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<User> {
|
||||||
return this.getUserByNameWithHttpInfo(username, extraHttpRequestParams)
|
return this.getUserByNameWithHttpInfo(username, extraHttpRequestParams)
|
||||||
@ -205,15 +205,15 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -250,15 +250,15 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -295,15 +295,15 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
@ -340,13 +340,13 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -365,7 +365,7 @@ export class UserService {
|
|||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
*
|
*
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
public getUserByNameWithHttpInfo(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
|
public getUserByNameWithHttpInfo(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
|
||||||
@ -380,13 +380,13 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -432,13 +432,13 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -469,13 +469,13 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
let requestOptions: RequestOptionsArgs = new RequestOptions({
|
||||||
@ -513,15 +513,15 @@ export class UserService {
|
|||||||
'application/xml',
|
'application/xml',
|
||||||
'application/json'
|
'application/json'
|
||||||
];
|
];
|
||||||
let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
if (httpHeaderAcceptSelected != undefined) {
|
if (httpHeaderAcceptSelected != undefined) {
|
||||||
headers.set("Accept", httpHeaderAcceptSelected);
|
headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// to determine the Content-Type header
|
// to determine the Content-Type header
|
||||||
let consumes: string[] = [
|
const consumes: string[] = [
|
||||||
];
|
];
|
||||||
let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes);
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
if (httpContentTypeSelected != undefined) {
|
if (httpContentTypeSelected != undefined) {
|
||||||
headers.set('Content-Type', httpContentTypeSelected);
|
headers.set('Content-Type', httpContentTypeSelected);
|
||||||
}
|
}
|
||||||
|
@ -31,5 +31,5 @@ export namespace Order {
|
|||||||
Placed: 'placed' as StatusEnum,
|
Placed: 'placed' as StatusEnum,
|
||||||
Approved: 'approved' as StatusEnum,
|
Approved: 'approved' as StatusEnum,
|
||||||
Delivered: 'delivered' as StatusEnum
|
Delivered: 'delivered' as StatusEnum
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
@ -33,5 +33,5 @@ export namespace Pet {
|
|||||||
Available: 'available' as StatusEnum,
|
Available: 'available' as StatusEnum,
|
||||||
Pending: 'pending' as StatusEnum,
|
Pending: 'pending' as StatusEnum,
|
||||||
Sold: 'sold' as StatusEnum
|
Sold: 'sold' as StatusEnum
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user