@@ -35,7 +35,7 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
3535 * @param { *} [options] Override http request option.
3636 * @throws {RequiredError}
3737 */
38- {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options: any = {}): RequestArgs {
38+ {{nickname}}: async ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options: any = {}): Promise< RequestArgs> => {
3939 {{#allParams}}
4040 {{#required}}
4141 // verify required parameter '{{paramName}}' is not null or undefined
@@ -62,16 +62,16 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
6262 {{#isKeyInHeader}}
6363 if (configuration && configuration.apiKey) {
6464 const localVarApiKeyValue = typeof configuration.apiKey === 'function'
65- ? configuration.apiKey("{{keyParamName}}")
66- : configuration.apiKey;
65+ ? await configuration.apiKey("{{keyParamName}}")
66+ : await configuration.apiKey;
6767 localVarHeaderParameter["{{keyParamName}}"] = localVarApiKeyValue;
6868 }
6969 {{/isKeyInHeader}}
7070 {{#isKeyInQuery}}
7171 if (configuration && configuration.apiKey) {
7272 const localVarApiKeyValue = typeof configuration.apiKey === 'function'
73- ? configuration.apiKey("{{keyParamName}}")
74- : configuration.apiKey;
73+ ? await configuration.apiKey("{{keyParamName}}")
74+ : await configuration.apiKey;
7575 localVarQueryParameter["{{keyParamName}}"] = localVarApiKeyValue;
7676 }
7777 {{/isKeyInQuery}}
@@ -228,8 +228,8 @@ export const {{classname}}Fp = function(configuration?: Configuration) {
228228 * @param {*} [options] Override http request option.
229229 * @throws { RequiredError}
230230 */
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);
233233 return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
234234 const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url} ;
235235 return axios.request(axiosRequestArgs);
@@ -259,7 +259,7 @@ export const {{classname}}Factory = function (configuration?: Configuration, bas
259259 * @throws {RequiredError}
260260 */
261261 {{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) );
263263 },
264264 {{/operation}}
265265 };
@@ -319,7 +319,7 @@ export class {{classname}} extends BaseAPI {
319319 * @memberof {{classname}}
320320 */
321321 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) );
323323 }
324324
325325 {{/operation}}
0 commit comments