@@ -35,7 +35,7 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
35
35
* @param { *} [options] Override http request option.
36
36
* @throws {RequiredError}
37
37
*/
38
- {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options: any = {}): RequestArgs {
38
+ {{nickname}}: async ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options: any = {}): Promise< RequestArgs> => {
39
39
{{#allParams}}
40
40
{{#required}}
41
41
// verify required parameter '{{paramName}}' is not null or undefined
@@ -62,16 +62,16 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
62
62
{{#isKeyInHeader}}
63
63
if (configuration && configuration.apiKey) {
64
64
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
65
- ? configuration.apiKey("{{keyParamName}}")
66
- : configuration.apiKey;
65
+ ? await configuration.apiKey("{{keyParamName}}")
66
+ : await configuration.apiKey;
67
67
localVarHeaderParameter["{{keyParamName}}"] = localVarApiKeyValue;
68
68
}
69
69
{{/isKeyInHeader}}
70
70
{{#isKeyInQuery}}
71
71
if (configuration && configuration.apiKey) {
72
72
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
73
- ? configuration.apiKey("{{keyParamName}}")
74
- : configuration.apiKey;
73
+ ? await configuration.apiKey("{{keyParamName}}")
74
+ : await configuration.apiKey;
75
75
localVarQueryParameter["{{keyParamName}}"] = localVarApiKeyValue;
76
76
}
77
77
{{/isKeyInQuery}}
@@ -228,8 +228,8 @@ export const {{classname}}Fp = function(configuration?: Configuration) {
228
228
* @param {*} [options] Override http request option.
229
229
* @throws { RequiredError}
230
230
*/
231
- { {nickname} }({ {#allParams} }{ {paramName} }{ {^required} }?{ {/required} }: { {{dataType} }}, { {/allParams} }options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ {#returnType} }{ {{returnType} }}{ {/returnType} }{ {^returnType} }void{ {/returnType} }> {
232
- const localVarAxiosArgs = {{classname} }AxiosParamCreator(configuration).{ {nickname} }({ {#allParams} }{ {paramName} }, { {/allParams} }options);
231
+ async { {nickname} }({ {#allParams} }{ {paramName} }{ {^required} }?{ {/required} }: { {{dataType} }}, { {/allParams} }options?: any): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ {#returnType} }{ {{returnType} }}{ {/returnType} }{ {^returnType} }void{ {/returnType} }> > {
232
+ const localVarAxiosArgs = await {{classname} }AxiosParamCreator(configuration).{ {nickname} }({ {#allParams} }{ {paramName} }, { {/allParams} }options);
233
233
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
234
234
const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url} ;
235
235
return axios.request(axiosRequestArgs);
@@ -259,7 +259,7 @@ export const {{classname}}Factory = function (configuration?: Configuration, bas
259
259
* @throws {RequiredError}
260
260
*/
261
261
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): AxiosPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {
262
- return {{classname}}Fp(configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options)( axios, basePath);
262
+ return {{classname}}Fp(configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options).then((request) => request( axios, basePath) );
263
263
},
264
264
{{/operation}}
265
265
};
@@ -319,7 +319,7 @@ export class {{classname}} extends BaseAPI {
319
319
* @memberof {{classname}}
320
320
*/
321
321
public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any) {
322
- return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options)( this.axios, this.basePath);
322
+ return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options).then((request) => request( this.axios, this.basePath) );
323
323
}
324
324
325
325
{{/operation}}
0 commit comments