forked from loafle/openapi-generator-original
[typescript-node] Promise-based Authentication interface (#3408)
This commit is contained in:
parent
f436904359
commit
76fecf744b
@ -197,12 +197,13 @@ export class {{classname}} {
|
|||||||
{{/bodyParam}}
|
{{/bodyParam}}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let authenticationPromise = Promise.resolve();
|
||||||
{{#authMethods}}
|
{{#authMethods}}
|
||||||
this.authentications.{{name}}.applyToRequest(localVarRequestOptions);
|
authenticationPromise = authenticationPromise.then(() => this.authentications.{{name}}.applyToRequest(localVarRequestOptions));
|
||||||
|
|
||||||
{{/authMethods}}
|
{{/authMethods}}
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -226,6 +227,7 @@ export class {{classname}} {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ export interface Authentication {
|
|||||||
/**
|
/**
|
||||||
* Apply authentication settings to header and query params.
|
* Apply authentication settings to header and query params.
|
||||||
*/
|
*/
|
||||||
applyToRequest(requestOptions: localVarRequest.Options): void;
|
applyToRequest(requestOptions: localVarRequest.Options): Promise<void> | void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class HttpBasicAuth implements Authentication {
|
export class HttpBasicAuth implements Authentication {
|
||||||
|
@ -109,10 +109,11 @@ export class PetApi {
|
|||||||
body: ObjectSerializer.serialize(body, "Pet")
|
body: ObjectSerializer.serialize(body, "Pet")
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.petstore_auth.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions));
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
||||||
|
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -133,6 +134,7 @@ export class PetApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -166,10 +168,11 @@ export class PetApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.petstore_auth.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions));
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
||||||
|
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -190,6 +193,7 @@ export class PetApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Multiple status values can be provided with comma separated strings
|
* Multiple status values can be provided with comma separated strings
|
||||||
@ -224,10 +228,11 @@ export class PetApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.petstore_auth.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions));
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
||||||
|
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -249,6 +254,7 @@ export class PetApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
@ -283,10 +289,11 @@ export class PetApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.petstore_auth.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions));
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
||||||
|
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -308,6 +315,7 @@ export class PetApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Returns a single pet
|
* Returns a single pet
|
||||||
@ -339,10 +347,11 @@ export class PetApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.api_key.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.api_key.applyToRequest(localVarRequestOptions));
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
||||||
|
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -364,6 +373,7 @@ export class PetApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -395,10 +405,11 @@ export class PetApi {
|
|||||||
body: ObjectSerializer.serialize(body, "Pet")
|
body: ObjectSerializer.serialize(body, "Pet")
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.petstore_auth.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions));
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
||||||
|
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -419,6 +430,7 @@ export class PetApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -460,10 +472,11 @@ export class PetApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.petstore_auth.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions));
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
||||||
|
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -484,6 +497,7 @@ export class PetApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -526,10 +540,11 @@ export class PetApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.petstore_auth.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions));
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
||||||
|
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -551,5 +566,6 @@ export class PetApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,8 +102,9 @@ export class StoreApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -124,6 +125,7 @@ export class StoreApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Returns a map of status codes to quantities
|
* Returns a map of status codes to quantities
|
||||||
@ -148,10 +150,11 @@ export class StoreApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.api_key.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.api_key.applyToRequest(localVarRequestOptions));
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
||||||
|
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -173,6 +176,7 @@ export class StoreApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
@ -204,8 +208,9 @@ export class StoreApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -227,6 +232,7 @@ export class StoreApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -258,8 +264,9 @@ export class StoreApi {
|
|||||||
body: ObjectSerializer.serialize(body, "Order")
|
body: ObjectSerializer.serialize(body, "Order")
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -281,5 +288,6 @@ export class StoreApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,8 +99,9 @@ export class UserApi {
|
|||||||
body: ObjectSerializer.serialize(body, "User")
|
body: ObjectSerializer.serialize(body, "User")
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -121,6 +122,7 @@ export class UserApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -152,8 +154,9 @@ export class UserApi {
|
|||||||
body: ObjectSerializer.serialize(body, "Array<User>")
|
body: ObjectSerializer.serialize(body, "Array<User>")
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -174,6 +177,7 @@ export class UserApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -205,8 +209,9 @@ export class UserApi {
|
|||||||
body: ObjectSerializer.serialize(body, "Array<User>")
|
body: ObjectSerializer.serialize(body, "Array<User>")
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -227,6 +232,7 @@ export class UserApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -258,8 +264,9 @@ export class UserApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -280,6 +287,7 @@ export class UserApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -311,8 +319,9 @@ export class UserApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -334,6 +343,7 @@ export class UserApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -378,8 +388,9 @@ export class UserApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -401,6 +412,7 @@ export class UserApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -425,8 +437,9 @@ export class UserApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -447,6 +460,7 @@ export class UserApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -485,8 +499,9 @@ export class UserApi {
|
|||||||
body: ObjectSerializer.serialize(body, "User")
|
body: ObjectSerializer.serialize(body, "User")
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -507,5 +522,6 @@ export class UserApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ export interface Authentication {
|
|||||||
/**
|
/**
|
||||||
* Apply authentication settings to header and query params.
|
* Apply authentication settings to header and query params.
|
||||||
*/
|
*/
|
||||||
applyToRequest(requestOptions: localVarRequest.Options): void;
|
applyToRequest(requestOptions: localVarRequest.Options): Promise<void> | void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class HttpBasicAuth implements Authentication {
|
export class HttpBasicAuth implements Authentication {
|
||||||
|
@ -109,10 +109,11 @@ export class PetApi {
|
|||||||
body: ObjectSerializer.serialize(body, "Pet")
|
body: ObjectSerializer.serialize(body, "Pet")
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.petstore_auth.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions));
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
||||||
|
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -133,6 +134,7 @@ export class PetApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -166,10 +168,11 @@ export class PetApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.petstore_auth.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions));
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
||||||
|
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -190,6 +193,7 @@ export class PetApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Multiple status values can be provided with comma separated strings
|
* Multiple status values can be provided with comma separated strings
|
||||||
@ -224,10 +228,11 @@ export class PetApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.petstore_auth.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions));
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
||||||
|
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -249,6 +254,7 @@ export class PetApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
@ -283,10 +289,11 @@ export class PetApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.petstore_auth.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions));
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
||||||
|
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -308,6 +315,7 @@ export class PetApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Returns a single pet
|
* Returns a single pet
|
||||||
@ -339,10 +347,11 @@ export class PetApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.api_key.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.api_key.applyToRequest(localVarRequestOptions));
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
||||||
|
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -364,6 +373,7 @@ export class PetApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -395,10 +405,11 @@ export class PetApi {
|
|||||||
body: ObjectSerializer.serialize(body, "Pet")
|
body: ObjectSerializer.serialize(body, "Pet")
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.petstore_auth.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions));
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
||||||
|
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -419,6 +430,7 @@ export class PetApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -460,10 +472,11 @@ export class PetApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.petstore_auth.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions));
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
||||||
|
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -484,6 +497,7 @@ export class PetApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -526,10 +540,11 @@ export class PetApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.petstore_auth.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions));
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
||||||
|
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -551,5 +566,6 @@ export class PetApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,8 +102,9 @@ export class StoreApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -124,6 +125,7 @@ export class StoreApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Returns a map of status codes to quantities
|
* Returns a map of status codes to quantities
|
||||||
@ -148,10 +150,11 @@ export class StoreApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.api_key.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.api_key.applyToRequest(localVarRequestOptions));
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
||||||
|
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -173,6 +176,7 @@ export class StoreApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
@ -204,8 +208,9 @@ export class StoreApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -227,6 +232,7 @@ export class StoreApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -258,8 +264,9 @@ export class StoreApi {
|
|||||||
body: ObjectSerializer.serialize(body, "Order")
|
body: ObjectSerializer.serialize(body, "Order")
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -281,5 +288,6 @@ export class StoreApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,8 +99,9 @@ export class UserApi {
|
|||||||
body: ObjectSerializer.serialize(body, "User")
|
body: ObjectSerializer.serialize(body, "User")
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -121,6 +122,7 @@ export class UserApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -152,8 +154,9 @@ export class UserApi {
|
|||||||
body: ObjectSerializer.serialize(body, "Array<User>")
|
body: ObjectSerializer.serialize(body, "Array<User>")
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -174,6 +177,7 @@ export class UserApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -205,8 +209,9 @@ export class UserApi {
|
|||||||
body: ObjectSerializer.serialize(body, "Array<User>")
|
body: ObjectSerializer.serialize(body, "Array<User>")
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -227,6 +232,7 @@ export class UserApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -258,8 +264,9 @@ export class UserApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -280,6 +287,7 @@ export class UserApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -311,8 +319,9 @@ export class UserApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -334,6 +343,7 @@ export class UserApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -378,8 +388,9 @@ export class UserApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -401,6 +412,7 @@ export class UserApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -425,8 +437,9 @@ export class UserApi {
|
|||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -447,6 +460,7 @@ export class UserApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -485,8 +499,9 @@ export class UserApi {
|
|||||||
body: ObjectSerializer.serialize(body, "User")
|
body: ObjectSerializer.serialize(body, "User")
|
||||||
};
|
};
|
||||||
|
|
||||||
this.authentications.default.applyToRequest(localVarRequestOptions);
|
let authenticationPromise = Promise.resolve();
|
||||||
|
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
||||||
|
return authenticationPromise.then(() => {
|
||||||
if (Object.keys(localVarFormParams).length) {
|
if (Object.keys(localVarFormParams).length) {
|
||||||
if (localVarUseFormData) {
|
if (localVarUseFormData) {
|
||||||
(<any>localVarRequestOptions).formData = localVarFormParams;
|
(<any>localVarRequestOptions).formData = localVarFormParams;
|
||||||
@ -507,5 +522,6 @@ export class UserApi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ export interface Authentication {
|
|||||||
/**
|
/**
|
||||||
* Apply authentication settings to header and query params.
|
* Apply authentication settings to header and query params.
|
||||||
*/
|
*/
|
||||||
applyToRequest(requestOptions: localVarRequest.Options): void;
|
applyToRequest(requestOptions: localVarRequest.Options): Promise<void> | void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class HttpBasicAuth implements Authentication {
|
export class HttpBasicAuth implements Authentication {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user