diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache index b0fb98f45989..a6a13e318204 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache @@ -4,7 +4,7 @@ {{^withSeparateModelsAndApi}} import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; {{#withNodeImports}} // URLSearchParams not necessarily used diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache index 9e54f08b30e4..22a113327768 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache @@ -4,7 +4,7 @@ {{>licenseInfo}} import type { Configuration } from '{{apiRelativeToRoot}}configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; {{#withNodeImports}} // URLSearchParams not necessarily used @@ -47,7 +47,7 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur * @deprecated{{/isDeprecated}} * @throws {RequiredError} */ - {{nickname}}: async ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}options: AxiosRequestConfig = {}): Promise => { + {{nickname}}: async ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}options: RawAxiosRequestConfig = {}): Promise => { {{#allParams}} {{#required}} // verify required parameter '{{paramName}}' is not null or undefined @@ -258,7 +258,7 @@ export const {{classname}}Fp = function(configuration?: Configuration) { * @deprecated{{/isDeprecated}} * @throws {RequiredError} */ - async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>> { + async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>> { const localVarAxiosArgs = await localVarAxiosParamCreator.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['{{classname}}.{{nickname}}']?.[index]?.url; @@ -332,7 +332,7 @@ export interface {{classname}}Interface { * @throws {RequiredError} * @memberof {{classname}}Interface */ - {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}options?: AxiosRequestConfig): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>; + {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}options?: RawAxiosRequestConfig): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>; {{/operation}} } @@ -398,12 +398,12 @@ export class {{classname}} extends BaseAPI { * @memberof {{classname}} */ {{#useSingleRequestParameter}} - public {{nickname}}({{#allParams.0}}requestParameters: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, {{/allParams.0}}options?: AxiosRequestConfig) { + public {{nickname}}({{#allParams.0}}requestParameters: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, {{/allParams.0}}options?: RawAxiosRequestConfig) { return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams.0}}{{#allParams}}requestParameters.{{paramName}}, {{/allParams}}{{/allParams.0}}options).then((request) => request(this.axios, this.basePath)); } {{/useSingleRequestParameter}} {{^useSingleRequestParameter}} - public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}options?: AxiosRequestConfig) { + public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}options?: RawAxiosRequestConfig) { return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options).then((request) => request(this.axios, this.basePath)); } {{/useSingleRequestParameter}} diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache index 21b32eac4e11..d14b428f686f 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache @@ -5,7 +5,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "{{{basePath}}}".replace(/\/+$/, ""); @@ -28,7 +28,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache index c331fba6fdfb..da599f177877 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache @@ -26,7 +26,7 @@ "prepare": "npm run build" }, "dependencies": { - "axios": "^0.27.2" + "axios": "^1.6.1" }, "devDependencies": { "@types/node": "^12.11.5", diff --git a/samples/client/echo_api/typescript-axios/build/api.ts b/samples/client/echo_api/typescript-axios/build/api.ts index 26516836aca4..42f7102a3955 100644 --- a/samples/client/echo_api/typescript-axios/build/api.ts +++ b/samples/client/echo_api/typescript-axios/build/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -348,7 +348,7 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testAuthHttpBasic: async (options: AxiosRequestConfig = {}): Promise => { + testAuthHttpBasic: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/auth/http/basic`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -392,7 +392,7 @@ export const AuthApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testAuthHttpBasic(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testAuthHttpBasic(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testAuthHttpBasic(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['AuthApi.testAuthHttpBasic']?.[index]?.url; @@ -434,7 +434,7 @@ export class AuthApi extends BaseAPI { * @throws {RequiredError} * @memberof AuthApi */ - public testAuthHttpBasic(options?: AxiosRequestConfig) { + public testAuthHttpBasic(options?: RawAxiosRequestConfig) { return AuthApiFp(this.configuration).testAuthHttpBasic(options).then((request) => request(this.axios, this.basePath)); } } @@ -453,7 +453,7 @@ export const BodyApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testBinaryGif: async (options: AxiosRequestConfig = {}): Promise => { + testBinaryGif: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/binary/gif`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -484,7 +484,7 @@ export const BodyApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testBodyApplicationOctetstreamBinary: async (body?: File, options: AxiosRequestConfig = {}): Promise => { + testBodyApplicationOctetstreamBinary: async (body?: File, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/body/application/octetstream/binary`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -518,7 +518,7 @@ export const BodyApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testBodyMultipartFormdataArrayOfBinary: async (files: Array, options: AxiosRequestConfig = {}): Promise => { + testBodyMultipartFormdataArrayOfBinary: async (files: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'files' is not null or undefined assertParamExists('testBodyMultipartFormdataArrayOfBinary', 'files', files) const localVarPath = `/body/application/octetstream/array_of_binary`; @@ -561,7 +561,7 @@ export const BodyApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEchoBodyAllOfPet: async (pet?: Pet, options: AxiosRequestConfig = {}): Promise => { + testEchoBodyAllOfPet: async (pet?: Pet, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/echo/body/allOf/Pet`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -595,7 +595,7 @@ export const BodyApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEchoBodyFreeFormObjectResponseString: async (body?: object, options: AxiosRequestConfig = {}): Promise => { + testEchoBodyFreeFormObjectResponseString: async (body?: object, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/echo/body/FreeFormObject/response_string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -629,7 +629,7 @@ export const BodyApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEchoBodyPet: async (pet?: Pet, options: AxiosRequestConfig = {}): Promise => { + testEchoBodyPet: async (pet?: Pet, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/echo/body/Pet`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -663,7 +663,7 @@ export const BodyApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEchoBodyPetResponseString: async (pet?: Pet, options: AxiosRequestConfig = {}): Promise => { + testEchoBodyPetResponseString: async (pet?: Pet, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/echo/body/Pet/response_string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -697,7 +697,7 @@ export const BodyApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEchoBodyTagResponseString: async (tag?: Tag, options: AxiosRequestConfig = {}): Promise => { + testEchoBodyTagResponseString: async (tag?: Tag, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/echo/body/Tag/response_string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -740,7 +740,7 @@ export const BodyApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testBinaryGif(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testBinaryGif(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testBinaryGif(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BodyApi.testBinaryGif']?.[index]?.url; @@ -753,7 +753,7 @@ export const BodyApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testBodyApplicationOctetstreamBinary(body?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testBodyApplicationOctetstreamBinary(body?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testBodyApplicationOctetstreamBinary(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BodyApi.testBodyApplicationOctetstreamBinary']?.[index]?.url; @@ -766,7 +766,7 @@ export const BodyApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testBodyMultipartFormdataArrayOfBinary(files: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testBodyMultipartFormdataArrayOfBinary(files: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testBodyMultipartFormdataArrayOfBinary(files, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BodyApi.testBodyMultipartFormdataArrayOfBinary']?.[index]?.url; @@ -779,7 +779,7 @@ export const BodyApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEchoBodyAllOfPet(pet?: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEchoBodyAllOfPet(pet?: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEchoBodyAllOfPet(pet, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BodyApi.testEchoBodyAllOfPet']?.[index]?.url; @@ -792,7 +792,7 @@ export const BodyApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEchoBodyFreeFormObjectResponseString(body?: object, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEchoBodyFreeFormObjectResponseString(body?: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEchoBodyFreeFormObjectResponseString(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BodyApi.testEchoBodyFreeFormObjectResponseString']?.[index]?.url; @@ -805,7 +805,7 @@ export const BodyApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEchoBodyPet(pet?: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEchoBodyPet(pet?: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEchoBodyPet(pet, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BodyApi.testEchoBodyPet']?.[index]?.url; @@ -818,7 +818,7 @@ export const BodyApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEchoBodyPetResponseString(pet?: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEchoBodyPetResponseString(pet?: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEchoBodyPetResponseString(pet, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BodyApi.testEchoBodyPetResponseString']?.[index]?.url; @@ -831,7 +831,7 @@ export const BodyApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEchoBodyTagResponseString(tag?: Tag, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEchoBodyTagResponseString(tag?: Tag, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEchoBodyTagResponseString(tag, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BodyApi.testEchoBodyTagResponseString']?.[index]?.url; @@ -943,7 +943,7 @@ export class BodyApi extends BaseAPI { * @throws {RequiredError} * @memberof BodyApi */ - public testBinaryGif(options?: AxiosRequestConfig) { + public testBinaryGif(options?: RawAxiosRequestConfig) { return BodyApiFp(this.configuration).testBinaryGif(options).then((request) => request(this.axios, this.basePath)); } @@ -955,7 +955,7 @@ export class BodyApi extends BaseAPI { * @throws {RequiredError} * @memberof BodyApi */ - public testBodyApplicationOctetstreamBinary(body?: File, options?: AxiosRequestConfig) { + public testBodyApplicationOctetstreamBinary(body?: File, options?: RawAxiosRequestConfig) { return BodyApiFp(this.configuration).testBodyApplicationOctetstreamBinary(body, options).then((request) => request(this.axios, this.basePath)); } @@ -967,7 +967,7 @@ export class BodyApi extends BaseAPI { * @throws {RequiredError} * @memberof BodyApi */ - public testBodyMultipartFormdataArrayOfBinary(files: Array, options?: AxiosRequestConfig) { + public testBodyMultipartFormdataArrayOfBinary(files: Array, options?: RawAxiosRequestConfig) { return BodyApiFp(this.configuration).testBodyMultipartFormdataArrayOfBinary(files, options).then((request) => request(this.axios, this.basePath)); } @@ -979,7 +979,7 @@ export class BodyApi extends BaseAPI { * @throws {RequiredError} * @memberof BodyApi */ - public testEchoBodyAllOfPet(pet?: Pet, options?: AxiosRequestConfig) { + public testEchoBodyAllOfPet(pet?: Pet, options?: RawAxiosRequestConfig) { return BodyApiFp(this.configuration).testEchoBodyAllOfPet(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -991,7 +991,7 @@ export class BodyApi extends BaseAPI { * @throws {RequiredError} * @memberof BodyApi */ - public testEchoBodyFreeFormObjectResponseString(body?: object, options?: AxiosRequestConfig) { + public testEchoBodyFreeFormObjectResponseString(body?: object, options?: RawAxiosRequestConfig) { return BodyApiFp(this.configuration).testEchoBodyFreeFormObjectResponseString(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1003,7 +1003,7 @@ export class BodyApi extends BaseAPI { * @throws {RequiredError} * @memberof BodyApi */ - public testEchoBodyPet(pet?: Pet, options?: AxiosRequestConfig) { + public testEchoBodyPet(pet?: Pet, options?: RawAxiosRequestConfig) { return BodyApiFp(this.configuration).testEchoBodyPet(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -1015,7 +1015,7 @@ export class BodyApi extends BaseAPI { * @throws {RequiredError} * @memberof BodyApi */ - public testEchoBodyPetResponseString(pet?: Pet, options?: AxiosRequestConfig) { + public testEchoBodyPetResponseString(pet?: Pet, options?: RawAxiosRequestConfig) { return BodyApiFp(this.configuration).testEchoBodyPetResponseString(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -1027,7 +1027,7 @@ export class BodyApi extends BaseAPI { * @throws {RequiredError} * @memberof BodyApi */ - public testEchoBodyTagResponseString(tag?: Tag, options?: AxiosRequestConfig) { + public testEchoBodyTagResponseString(tag?: Tag, options?: RawAxiosRequestConfig) { return BodyApiFp(this.configuration).testEchoBodyTagResponseString(tag, options).then((request) => request(this.axios, this.basePath)); } } @@ -1049,7 +1049,7 @@ export const FormApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testFormIntegerBooleanString: async (integerForm?: number, booleanForm?: boolean, stringForm?: string, options: AxiosRequestConfig = {}): Promise => { + testFormIntegerBooleanString: async (integerForm?: number, booleanForm?: boolean, stringForm?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/form/integer/boolean/string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1101,7 +1101,7 @@ export const FormApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testFormOneof: async (form1?: string, form2?: number, form3?: string, form4?: boolean, id?: number, name?: string, options: AxiosRequestConfig = {}): Promise => { + testFormOneof: async (form1?: string, form2?: number, form3?: string, form4?: boolean, id?: number, name?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/form/oneof`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1172,7 +1172,7 @@ export const FormApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testFormIntegerBooleanString(integerForm?: number, booleanForm?: boolean, stringForm?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testFormIntegerBooleanString(integerForm?: number, booleanForm?: boolean, stringForm?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testFormIntegerBooleanString(integerForm, booleanForm, stringForm, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FormApi.testFormIntegerBooleanString']?.[index]?.url; @@ -1190,7 +1190,7 @@ export const FormApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testFormOneof(form1?: string, form2?: number, form3?: string, form4?: boolean, id?: number, name?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testFormOneof(form1?: string, form2?: number, form3?: string, form4?: boolean, id?: number, name?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testFormOneof(form1, form2, form3, form4, id, name, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FormApi.testFormOneof']?.[index]?.url; @@ -1253,7 +1253,7 @@ export class FormApi extends BaseAPI { * @throws {RequiredError} * @memberof FormApi */ - public testFormIntegerBooleanString(integerForm?: number, booleanForm?: boolean, stringForm?: string, options?: AxiosRequestConfig) { + public testFormIntegerBooleanString(integerForm?: number, booleanForm?: boolean, stringForm?: string, options?: RawAxiosRequestConfig) { return FormApiFp(this.configuration).testFormIntegerBooleanString(integerForm, booleanForm, stringForm, options).then((request) => request(this.axios, this.basePath)); } @@ -1270,7 +1270,7 @@ export class FormApi extends BaseAPI { * @throws {RequiredError} * @memberof FormApi */ - public testFormOneof(form1?: string, form2?: number, form3?: string, form4?: boolean, id?: number, name?: string, options?: AxiosRequestConfig) { + public testFormOneof(form1?: string, form2?: number, form3?: string, form4?: boolean, id?: number, name?: string, options?: RawAxiosRequestConfig) { return FormApiFp(this.configuration).testFormOneof(form1, form2, form3, form4, id, name, options).then((request) => request(this.axios, this.basePath)); } } @@ -1294,7 +1294,7 @@ export const HeaderApiAxiosParamCreator = function (configuration?: Configuratio * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testHeaderIntegerBooleanStringEnums: async (integerHeader?: number, booleanHeader?: boolean, stringHeader?: string, enumNonrefStringHeader?: TestHeaderIntegerBooleanStringEnumsEnumNonrefStringHeaderEnum, enumRefStringHeader?: StringEnumRef, options: AxiosRequestConfig = {}): Promise => { + testHeaderIntegerBooleanStringEnums: async (integerHeader?: number, booleanHeader?: boolean, stringHeader?: string, enumNonrefStringHeader?: TestHeaderIntegerBooleanStringEnumsEnumNonrefStringHeaderEnum, enumRefStringHeader?: StringEnumRef, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/header/integer/boolean/string/enums`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1365,7 +1365,7 @@ export const HeaderApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testHeaderIntegerBooleanStringEnums(integerHeader?: number, booleanHeader?: boolean, stringHeader?: string, enumNonrefStringHeader?: TestHeaderIntegerBooleanStringEnumsEnumNonrefStringHeaderEnum, enumRefStringHeader?: StringEnumRef, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testHeaderIntegerBooleanStringEnums(integerHeader?: number, booleanHeader?: boolean, stringHeader?: string, enumNonrefStringHeader?: TestHeaderIntegerBooleanStringEnumsEnumNonrefStringHeaderEnum, enumRefStringHeader?: StringEnumRef, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['HeaderApi.testHeaderIntegerBooleanStringEnums']?.[index]?.url; @@ -1417,7 +1417,7 @@ export class HeaderApi extends BaseAPI { * @throws {RequiredError} * @memberof HeaderApi */ - public testHeaderIntegerBooleanStringEnums(integerHeader?: number, booleanHeader?: boolean, stringHeader?: string, enumNonrefStringHeader?: TestHeaderIntegerBooleanStringEnumsEnumNonrefStringHeaderEnum, enumRefStringHeader?: StringEnumRef, options?: AxiosRequestConfig) { + public testHeaderIntegerBooleanStringEnums(integerHeader?: number, booleanHeader?: boolean, stringHeader?: string, enumNonrefStringHeader?: TestHeaderIntegerBooleanStringEnumsEnumNonrefStringHeaderEnum, enumRefStringHeader?: StringEnumRef, options?: RawAxiosRequestConfig) { return HeaderApiFp(this.configuration).testHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader, options).then((request) => request(this.axios, this.basePath)); } } @@ -1449,7 +1449,7 @@ export const PathApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath: async (pathString: string, pathInteger: number, enumNonrefStringPath: TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathEnumNonrefStringPathEnum, enumRefStringPath: StringEnumRef, options: AxiosRequestConfig = {}): Promise => { + testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath: async (pathString: string, pathInteger: number, enumNonrefStringPath: TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathEnumNonrefStringPathEnum, enumRefStringPath: StringEnumRef, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'pathString' is not null or undefined assertParamExists('testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath', 'pathString', pathString) // verify required parameter 'pathInteger' is not null or undefined @@ -1505,7 +1505,7 @@ export const PathApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString: string, pathInteger: number, enumNonrefStringPath: TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathEnumNonrefStringPathEnum, enumRefStringPath: StringEnumRef, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString: string, pathInteger: number, enumNonrefStringPath: TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathEnumNonrefStringPathEnum, enumRefStringPath: StringEnumRef, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PathApi.testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath']?.[index]?.url; @@ -1555,7 +1555,7 @@ export class PathApi extends BaseAPI { * @throws {RequiredError} * @memberof PathApi */ - public testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString: string, pathInteger: number, enumNonrefStringPath: TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathEnumNonrefStringPathEnum, enumRefStringPath: StringEnumRef, options?: AxiosRequestConfig) { + public testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString: string, pathInteger: number, enumNonrefStringPath: TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathEnumNonrefStringPathEnum, enumRefStringPath: StringEnumRef, options?: RawAxiosRequestConfig) { return PathApiFp(this.configuration).testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath, options).then((request) => request(this.axios, this.basePath)); } } @@ -1585,7 +1585,7 @@ export const QueryApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEnumRefString: async (enumNonrefStringQuery?: TestEnumRefStringEnumNonrefStringQueryEnum, enumRefStringQuery?: StringEnumRef, options: AxiosRequestConfig = {}): Promise => { + testEnumRefString: async (enumNonrefStringQuery?: TestEnumRefStringEnumNonrefStringQueryEnum, enumRefStringQuery?: StringEnumRef, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/query/enum_ref_string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1626,7 +1626,7 @@ export const QueryApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryDatetimeDateString: async (datetimeQuery?: string, dateQuery?: string, stringQuery?: string, options: AxiosRequestConfig = {}): Promise => { + testQueryDatetimeDateString: async (datetimeQuery?: string, dateQuery?: string, stringQuery?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/query/datetime/date/string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1675,7 +1675,7 @@ export const QueryApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryIntegerBooleanString: async (integerQuery?: number, booleanQuery?: boolean, stringQuery?: string, options: AxiosRequestConfig = {}): Promise => { + testQueryIntegerBooleanString: async (integerQuery?: number, booleanQuery?: boolean, stringQuery?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/query/integer/boolean/string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1718,7 +1718,7 @@ export const QueryApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryStyleDeepObjectExplodeTrueObject: async (queryObject?: Pet, options: AxiosRequestConfig = {}): Promise => { + testQueryStyleDeepObjectExplodeTrueObject: async (queryObject?: Pet, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/query/style_deepObject/explode_true/object`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1755,7 +1755,7 @@ export const QueryApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryStyleDeepObjectExplodeTrueObjectAllOf: async (queryObject?: TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter, options: AxiosRequestConfig = {}): Promise => { + testQueryStyleDeepObjectExplodeTrueObjectAllOf: async (queryObject?: TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/query/style_deepObject/explode_true/object/allOf`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1792,7 +1792,7 @@ export const QueryApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryStyleFormExplodeTrueArrayString: async (queryObject?: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter, options: AxiosRequestConfig = {}): Promise => { + testQueryStyleFormExplodeTrueArrayString: async (queryObject?: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/query/style_form/explode_true/array_string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1829,7 +1829,7 @@ export const QueryApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryStyleFormExplodeTrueObject: async (queryObject?: Pet, options: AxiosRequestConfig = {}): Promise => { + testQueryStyleFormExplodeTrueObject: async (queryObject?: Pet, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/query/style_form/explode_true/object`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1866,7 +1866,7 @@ export const QueryApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryStyleFormExplodeTrueObjectAllOf: async (queryObject?: DataQuery, options: AxiosRequestConfig = {}): Promise => { + testQueryStyleFormExplodeTrueObjectAllOf: async (queryObject?: DataQuery, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/query/style_form/explode_true/object/allOf`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1914,7 +1914,7 @@ export const QueryApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEnumRefString(enumNonrefStringQuery?: TestEnumRefStringEnumNonrefStringQueryEnum, enumRefStringQuery?: StringEnumRef, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEnumRefString(enumNonrefStringQuery?: TestEnumRefStringEnumNonrefStringQueryEnum, enumRefStringQuery?: StringEnumRef, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEnumRefString(enumNonrefStringQuery, enumRefStringQuery, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['QueryApi.testEnumRefString']?.[index]?.url; @@ -1929,7 +1929,7 @@ export const QueryApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryDatetimeDateString(datetimeQuery?: string, dateQuery?: string, stringQuery?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryDatetimeDateString(datetimeQuery?: string, dateQuery?: string, stringQuery?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['QueryApi.testQueryDatetimeDateString']?.[index]?.url; @@ -1944,7 +1944,7 @@ export const QueryApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryIntegerBooleanString(integerQuery?: number, booleanQuery?: boolean, stringQuery?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryIntegerBooleanString(integerQuery?: number, booleanQuery?: boolean, stringQuery?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['QueryApi.testQueryIntegerBooleanString']?.[index]?.url; @@ -1957,7 +1957,7 @@ export const QueryApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryStyleDeepObjectExplodeTrueObject(queryObject?: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryStyleDeepObjectExplodeTrueObject(queryObject?: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryStyleDeepObjectExplodeTrueObject(queryObject, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['QueryApi.testQueryStyleDeepObjectExplodeTrueObject']?.[index]?.url; @@ -1970,7 +1970,7 @@ export const QueryApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject?: TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject?: TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['QueryApi.testQueryStyleDeepObjectExplodeTrueObjectAllOf']?.[index]?.url; @@ -1983,7 +1983,7 @@ export const QueryApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryStyleFormExplodeTrueArrayString(queryObject?: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryStyleFormExplodeTrueArrayString(queryObject?: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryStyleFormExplodeTrueArrayString(queryObject, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['QueryApi.testQueryStyleFormExplodeTrueArrayString']?.[index]?.url; @@ -1996,7 +1996,7 @@ export const QueryApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryStyleFormExplodeTrueObject(queryObject?: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryStyleFormExplodeTrueObject(queryObject?: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryStyleFormExplodeTrueObject(queryObject, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['QueryApi.testQueryStyleFormExplodeTrueObject']?.[index]?.url; @@ -2009,7 +2009,7 @@ export const QueryApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryStyleFormExplodeTrueObjectAllOf(queryObject?: DataQuery, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryStyleFormExplodeTrueObjectAllOf(queryObject?: DataQuery, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryStyleFormExplodeTrueObjectAllOf(queryObject, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['QueryApi.testQueryStyleFormExplodeTrueObjectAllOf']?.[index]?.url; @@ -2129,7 +2129,7 @@ export class QueryApi extends BaseAPI { * @throws {RequiredError} * @memberof QueryApi */ - public testEnumRefString(enumNonrefStringQuery?: TestEnumRefStringEnumNonrefStringQueryEnum, enumRefStringQuery?: StringEnumRef, options?: AxiosRequestConfig) { + public testEnumRefString(enumNonrefStringQuery?: TestEnumRefStringEnumNonrefStringQueryEnum, enumRefStringQuery?: StringEnumRef, options?: RawAxiosRequestConfig) { return QueryApiFp(this.configuration).testEnumRefString(enumNonrefStringQuery, enumRefStringQuery, options).then((request) => request(this.axios, this.basePath)); } @@ -2143,7 +2143,7 @@ export class QueryApi extends BaseAPI { * @throws {RequiredError} * @memberof QueryApi */ - public testQueryDatetimeDateString(datetimeQuery?: string, dateQuery?: string, stringQuery?: string, options?: AxiosRequestConfig) { + public testQueryDatetimeDateString(datetimeQuery?: string, dateQuery?: string, stringQuery?: string, options?: RawAxiosRequestConfig) { return QueryApiFp(this.configuration).testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery, options).then((request) => request(this.axios, this.basePath)); } @@ -2157,7 +2157,7 @@ export class QueryApi extends BaseAPI { * @throws {RequiredError} * @memberof QueryApi */ - public testQueryIntegerBooleanString(integerQuery?: number, booleanQuery?: boolean, stringQuery?: string, options?: AxiosRequestConfig) { + public testQueryIntegerBooleanString(integerQuery?: number, booleanQuery?: boolean, stringQuery?: string, options?: RawAxiosRequestConfig) { return QueryApiFp(this.configuration).testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery, options).then((request) => request(this.axios, this.basePath)); } @@ -2169,7 +2169,7 @@ export class QueryApi extends BaseAPI { * @throws {RequiredError} * @memberof QueryApi */ - public testQueryStyleDeepObjectExplodeTrueObject(queryObject?: Pet, options?: AxiosRequestConfig) { + public testQueryStyleDeepObjectExplodeTrueObject(queryObject?: Pet, options?: RawAxiosRequestConfig) { return QueryApiFp(this.configuration).testQueryStyleDeepObjectExplodeTrueObject(queryObject, options).then((request) => request(this.axios, this.basePath)); } @@ -2181,7 +2181,7 @@ export class QueryApi extends BaseAPI { * @throws {RequiredError} * @memberof QueryApi */ - public testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject?: TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter, options?: AxiosRequestConfig) { + public testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject?: TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter, options?: RawAxiosRequestConfig) { return QueryApiFp(this.configuration).testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject, options).then((request) => request(this.axios, this.basePath)); } @@ -2193,7 +2193,7 @@ export class QueryApi extends BaseAPI { * @throws {RequiredError} * @memberof QueryApi */ - public testQueryStyleFormExplodeTrueArrayString(queryObject?: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter, options?: AxiosRequestConfig) { + public testQueryStyleFormExplodeTrueArrayString(queryObject?: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter, options?: RawAxiosRequestConfig) { return QueryApiFp(this.configuration).testQueryStyleFormExplodeTrueArrayString(queryObject, options).then((request) => request(this.axios, this.basePath)); } @@ -2205,7 +2205,7 @@ export class QueryApi extends BaseAPI { * @throws {RequiredError} * @memberof QueryApi */ - public testQueryStyleFormExplodeTrueObject(queryObject?: Pet, options?: AxiosRequestConfig) { + public testQueryStyleFormExplodeTrueObject(queryObject?: Pet, options?: RawAxiosRequestConfig) { return QueryApiFp(this.configuration).testQueryStyleFormExplodeTrueObject(queryObject, options).then((request) => request(this.axios, this.basePath)); } @@ -2217,7 +2217,7 @@ export class QueryApi extends BaseAPI { * @throws {RequiredError} * @memberof QueryApi */ - public testQueryStyleFormExplodeTrueObjectAllOf(queryObject?: DataQuery, options?: AxiosRequestConfig) { + public testQueryStyleFormExplodeTrueObjectAllOf(queryObject?: DataQuery, options?: RawAxiosRequestConfig) { return QueryApiFp(this.configuration).testQueryStyleFormExplodeTrueObjectAllOf(queryObject, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/echo_api/typescript-axios/build/base.ts b/samples/client/echo_api/typescript-axios/build/base.ts index 0b934f634802..b95cd69a9ed8 100644 --- a/samples/client/echo_api/typescript-axios/build/base.ts +++ b/samples/client/echo_api/typescript-axios/build/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://localhost:3000".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/echo_api/typescript-axios/build/package.json b/samples/client/echo_api/typescript-axios/build/package.json index 2e6610e9576c..fc256cc498a5 100644 --- a/samples/client/echo_api/typescript-axios/build/package.json +++ b/samples/client/echo_api/typescript-axios/build/package.json @@ -22,7 +22,7 @@ "prepare": "npm run build" }, "dependencies": { - "axios": "^0.27.2" + "axios": "^1.6.1" }, "devDependencies": { "@types/node": "^12.11.5", diff --git a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts index d0ca3a315641..208ec53dda46 100644 --- a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts +++ b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts b/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts index 5474f6bcd41f..c1752e116e98 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -188,7 +188,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - filePost: async (filePostRequest?: FilePostRequest, options: AxiosRequestConfig = {}): Promise => { + filePost: async (filePostRequest?: FilePostRequest, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/file`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -221,7 +221,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - petsFilteredPatch: async (petsFilteredPatchRequest?: PetsFilteredPatchRequest | null, options: AxiosRequestConfig = {}): Promise => { + petsFilteredPatch: async (petsFilteredPatchRequest?: PetsFilteredPatchRequest | null, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/pets-filtered`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -254,7 +254,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - petsPatch: async (petsPatchRequest?: PetsPatchRequest | null, options: AxiosRequestConfig = {}): Promise => { + petsPatch: async (petsPatchRequest?: PetsPatchRequest | null, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/pets`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -297,7 +297,7 @@ export const DefaultApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async filePost(filePostRequest?: FilePostRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async filePost(filePostRequest?: FilePostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.filePost(filePostRequest, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['DefaultApi.filePost']?.[index]?.url; @@ -309,7 +309,7 @@ export const DefaultApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async petsFilteredPatch(petsFilteredPatchRequest?: PetsFilteredPatchRequest | null, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async petsFilteredPatch(petsFilteredPatchRequest?: PetsFilteredPatchRequest | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.petsFilteredPatch(petsFilteredPatchRequest, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['DefaultApi.petsFilteredPatch']?.[index]?.url; @@ -321,7 +321,7 @@ export const DefaultApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async petsPatch(petsPatchRequest?: PetsPatchRequest | null, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async petsPatch(petsPatchRequest?: PetsPatchRequest | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.petsPatch(petsPatchRequest, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['DefaultApi.petsPatch']?.[index]?.url; @@ -381,7 +381,7 @@ export class DefaultApi extends BaseAPI { * @throws {RequiredError} * @memberof DefaultApi */ - public filePost(filePostRequest?: FilePostRequest, options?: AxiosRequestConfig) { + public filePost(filePostRequest?: FilePostRequest, options?: RawAxiosRequestConfig) { return DefaultApiFp(this.configuration).filePost(filePostRequest, options).then((request) => request(this.axios, this.basePath)); } @@ -392,7 +392,7 @@ export class DefaultApi extends BaseAPI { * @throws {RequiredError} * @memberof DefaultApi */ - public petsFilteredPatch(petsFilteredPatchRequest?: PetsFilteredPatchRequest | null, options?: AxiosRequestConfig) { + public petsFilteredPatch(petsFilteredPatchRequest?: PetsFilteredPatchRequest | null, options?: RawAxiosRequestConfig) { return DefaultApiFp(this.configuration).petsFilteredPatch(petsFilteredPatchRequest, options).then((request) => request(this.axios, this.basePath)); } @@ -403,7 +403,7 @@ export class DefaultApi extends BaseAPI { * @throws {RequiredError} * @memberof DefaultApi */ - public petsPatch(petsPatchRequest?: PetsPatchRequest | null, options?: AxiosRequestConfig) { + public petsPatch(petsPatchRequest?: PetsPatchRequest | null, options?: RawAxiosRequestConfig) { return DefaultApiFp(this.configuration).petsPatch(petsPatchRequest, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts b/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts index 00697e3ddbc4..e215695bd26e 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://api.example.xyz/v1".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/default/api.ts b/samples/client/petstore/typescript-axios/builds/default/api.ts index b2d5f4574057..f74593fe5bb7 100644 --- a/samples/client/petstore/typescript-axios/builds/default/api.ts +++ b/samples/client/petstore/typescript-axios/builds/default/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -259,7 +259,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -300,7 +300,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -342,7 +342,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -384,7 +384,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -425,7 +425,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -462,7 +462,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -504,7 +504,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -556,7 +556,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -616,7 +616,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -630,7 +630,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -643,7 +643,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -657,7 +657,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -670,7 +670,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -683,7 +683,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -698,7 +698,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -713,7 +713,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -833,7 +833,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: AxiosRequestConfig) { + public addPet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -846,7 +846,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -858,7 +858,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -871,7 +871,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -883,7 +883,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -895,7 +895,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: AxiosRequestConfig) { + public updatePet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -909,7 +909,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -923,7 +923,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -952,7 +952,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -985,7 +985,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1019,7 +1019,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1053,7 +1053,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (body: Order, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('placeOrder', 'body', body) const localVarPath = `/store/order`; @@ -1099,7 +1099,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -1111,7 +1111,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -1124,7 +1124,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -1137,7 +1137,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -1210,7 +1210,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1221,7 +1221,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1233,7 +1233,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1245,7 +1245,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body: Order, options?: AxiosRequestConfig) { + public placeOrder(body: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1265,7 +1265,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1301,7 +1301,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1337,7 +1337,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1373,7 +1373,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1407,7 +1407,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1442,7 +1442,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1484,7 +1484,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1516,7 +1516,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1565,7 +1565,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -1578,7 +1578,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -1591,7 +1591,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -1604,7 +1604,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -1617,7 +1617,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -1631,7 +1631,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -1643,7 +1643,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -1657,7 +1657,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -1772,7 +1772,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: AxiosRequestConfig) { + public createUser(body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1784,7 +1784,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1796,7 +1796,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1808,7 +1808,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1820,7 +1820,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1833,7 +1833,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -1844,7 +1844,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -1857,7 +1857,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: AxiosRequestConfig) { + public updateUser(username: string, body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/default/base.ts b/samples/client/petstore/typescript-axios/builds/default/base.ts index 02192cb47b44..b92a383a84c7 100644 --- a/samples/client/petstore/typescript-axios/builds/default/base.ts +++ b/samples/client/petstore/typescript-axios/builds/default/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts index b2d5f4574057..f74593fe5bb7 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -259,7 +259,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -300,7 +300,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -342,7 +342,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -384,7 +384,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -425,7 +425,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -462,7 +462,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -504,7 +504,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -556,7 +556,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -616,7 +616,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -630,7 +630,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -643,7 +643,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -657,7 +657,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -670,7 +670,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -683,7 +683,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -698,7 +698,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -713,7 +713,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -833,7 +833,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: AxiosRequestConfig) { + public addPet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -846,7 +846,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -858,7 +858,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -871,7 +871,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -883,7 +883,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -895,7 +895,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: AxiosRequestConfig) { + public updatePet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -909,7 +909,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -923,7 +923,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -952,7 +952,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -985,7 +985,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1019,7 +1019,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1053,7 +1053,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (body: Order, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('placeOrder', 'body', body) const localVarPath = `/store/order`; @@ -1099,7 +1099,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -1111,7 +1111,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -1124,7 +1124,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -1137,7 +1137,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -1210,7 +1210,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1221,7 +1221,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1233,7 +1233,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1245,7 +1245,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body: Order, options?: AxiosRequestConfig) { + public placeOrder(body: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1265,7 +1265,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1301,7 +1301,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1337,7 +1337,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1373,7 +1373,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1407,7 +1407,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1442,7 +1442,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1484,7 +1484,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1516,7 +1516,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1565,7 +1565,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -1578,7 +1578,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -1591,7 +1591,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -1604,7 +1604,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -1617,7 +1617,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -1631,7 +1631,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -1643,7 +1643,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -1657,7 +1657,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -1772,7 +1772,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: AxiosRequestConfig) { + public createUser(body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1784,7 +1784,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1796,7 +1796,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1808,7 +1808,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1820,7 +1820,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1833,7 +1833,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -1844,7 +1844,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -1857,7 +1857,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: AxiosRequestConfig) { + public updateUser(username: string, body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/base.ts b/samples/client/petstore/typescript-axios/builds/es6-target/base.ts index 02192cb47b44..b92a383a84c7 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/base.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/package.json b/samples/client/petstore/typescript-axios/builds/es6-target/package.json index dc2da01a43e4..07a92ace734a 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/package.json +++ b/samples/client/petstore/typescript-axios/builds/es6-target/package.json @@ -24,7 +24,7 @@ "prepare": "npm run build" }, "dependencies": { - "axios": "^0.27.2" + "axios": "^1.6.1" }, "devDependencies": { "@types/node": "^12.11.5", diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts index 258ae1dc7561..a2119d89b148 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -1709,7 +1709,7 @@ export const AnotherFakeApiAxiosParamCreator = function (configuration?: Configu * @param {*} [options] Override http request option. * @throws {RequiredError} */ - _123testSpecialTags: async (client: Client, options: AxiosRequestConfig = {}): Promise => { + _123testSpecialTags: async (client: Client, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'client' is not null or undefined assertParamExists('_123testSpecialTags', 'client', client) const localVarPath = `/another-fake/dummy`; @@ -1755,7 +1755,7 @@ export const AnotherFakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async _123testSpecialTags(client: Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async _123testSpecialTags(client: Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator._123testSpecialTags(client, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['AnotherFakeApi._123testSpecialTags']?.[index]?.url; @@ -1799,7 +1799,7 @@ export class AnotherFakeApi extends BaseAPI { * @throws {RequiredError} * @memberof AnotherFakeApi */ - public _123testSpecialTags(client: Client, options?: AxiosRequestConfig) { + public _123testSpecialTags(client: Client, options?: RawAxiosRequestConfig) { return AnotherFakeApiFp(this.configuration)._123testSpecialTags(client, options).then((request) => request(this.axios, this.basePath)); } } @@ -1817,7 +1817,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fooGet: async (options: AxiosRequestConfig = {}): Promise => { + fooGet: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/foo`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1856,7 +1856,7 @@ export const DefaultApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fooGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fooGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fooGet(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['DefaultApi.fooGet']?.[index]?.url; @@ -1896,7 +1896,7 @@ export class DefaultApi extends BaseAPI { * @throws {RequiredError} * @memberof DefaultApi */ - public fooGet(options?: AxiosRequestConfig) { + public fooGet(options?: RawAxiosRequestConfig) { return DefaultApiFp(this.configuration).fooGet(options).then((request) => request(this.axios, this.basePath)); } } @@ -1915,7 +1915,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeHealthGet: async (options: AxiosRequestConfig = {}): Promise => { + fakeHealthGet: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/health`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1945,7 +1945,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterBooleanSerialize: async (body?: boolean, options: AxiosRequestConfig = {}): Promise => { + fakeOuterBooleanSerialize: async (body?: boolean, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/boolean`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1978,7 +1978,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterCompositeSerialize: async (outerComposite?: OuterComposite, options: AxiosRequestConfig = {}): Promise => { + fakeOuterCompositeSerialize: async (outerComposite?: OuterComposite, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/composite`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2011,7 +2011,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterNumberSerialize: async (body?: number, options: AxiosRequestConfig = {}): Promise => { + fakeOuterNumberSerialize: async (body?: number, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/number`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2044,7 +2044,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterStringSerialize: async (body?: string, options: AxiosRequestConfig = {}): Promise => { + fakeOuterStringSerialize: async (body?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2077,7 +2077,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getArrayOfEnums: async (options: AxiosRequestConfig = {}): Promise => { + getArrayOfEnums: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/array-of-enums`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2107,7 +2107,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testBodyWithFileSchema: async (fileSchemaTestClass: FileSchemaTestClass, options: AxiosRequestConfig = {}): Promise => { + testBodyWithFileSchema: async (fileSchemaTestClass: FileSchemaTestClass, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fileSchemaTestClass' is not null or undefined assertParamExists('testBodyWithFileSchema', 'fileSchemaTestClass', fileSchemaTestClass) const localVarPath = `/fake/body-with-file-schema`; @@ -2143,7 +2143,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testBodyWithQueryParams: async (query: string, user: User, options: AxiosRequestConfig = {}): Promise => { + testBodyWithQueryParams: async (query: string, user: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'query' is not null or undefined assertParamExists('testBodyWithQueryParams', 'query', query) // verify required parameter 'user' is not null or undefined @@ -2185,7 +2185,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testClientModel: async (client: Client, options: AxiosRequestConfig = {}): Promise => { + testClientModel: async (client: Client, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'client' is not null or undefined assertParamExists('testClientModel', 'client', client) const localVarPath = `/fake`; @@ -2234,7 +2234,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEndpointParameters: async (number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options: AxiosRequestConfig = {}): Promise => { + testEndpointParameters: async (number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'number' is not null or undefined assertParamExists('testEndpointParameters', 'number', number) // verify required parameter '_double' is not null or undefined @@ -2344,7 +2344,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEnumParameters: async (enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options: AxiosRequestConfig = {}): Promise => { + testEnumParameters: async (enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2417,7 +2417,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testGroupParameters: async (requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options: AxiosRequestConfig = {}): Promise => { + testGroupParameters: async (requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'requiredStringGroup' is not null or undefined assertParamExists('testGroupParameters', 'requiredStringGroup', requiredStringGroup) // verify required parameter 'requiredBooleanGroup' is not null or undefined @@ -2486,7 +2486,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testInlineAdditionalProperties: async (requestBody: { [key: string]: string; }, options: AxiosRequestConfig = {}): Promise => { + testInlineAdditionalProperties: async (requestBody: { [key: string]: string; }, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'requestBody' is not null or undefined assertParamExists('testInlineAdditionalProperties', 'requestBody', requestBody) const localVarPath = `/fake/inline-additionalProperties`; @@ -2522,7 +2522,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testInlineFreeformAdditionalProperties: async (testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options: AxiosRequestConfig = {}): Promise => { + testInlineFreeformAdditionalProperties: async (testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'testInlineFreeformAdditionalPropertiesRequest' is not null or undefined assertParamExists('testInlineFreeformAdditionalProperties', 'testInlineFreeformAdditionalPropertiesRequest', testInlineFreeformAdditionalPropertiesRequest) const localVarPath = `/fake/inline-freeform-additionalProperties`; @@ -2559,7 +2559,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testJsonFormData: async (param: string, param2: string, options: AxiosRequestConfig = {}): Promise => { + testJsonFormData: async (param: string, param2: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'param' is not null or undefined assertParamExists('testJsonFormData', 'param', param) // verify required parameter 'param2' is not null or undefined @@ -2609,7 +2609,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryParameterCollectionFormat: async (pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options: AxiosRequestConfig = {}): Promise => { + testQueryParameterCollectionFormat: async (pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'pipe' is not null or undefined assertParamExists('testQueryParameterCollectionFormat', 'pipe', pipe) // verify required parameter 'ioutil' is not null or undefined @@ -2679,7 +2679,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeHealthGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeHealthGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeHealthGet(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeHealthGet']?.[index]?.url; @@ -2691,7 +2691,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterBooleanSerialize(body?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterBooleanSerialize(body?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterBooleanSerialize(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeOuterBooleanSerialize']?.[index]?.url; @@ -2703,7 +2703,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterCompositeSerialize(outerComposite, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeOuterCompositeSerialize']?.[index]?.url; @@ -2715,7 +2715,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterNumberSerialize(body?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterNumberSerialize(body?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterNumberSerialize(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeOuterNumberSerialize']?.[index]?.url; @@ -2727,7 +2727,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterStringSerialize(body?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterStringSerialize(body?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterStringSerialize(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeOuterStringSerialize']?.[index]?.url; @@ -2739,7 +2739,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getArrayOfEnums(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async getArrayOfEnums(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getArrayOfEnums(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.getArrayOfEnums']?.[index]?.url; @@ -2751,7 +2751,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testBodyWithFileSchema(fileSchemaTestClass, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testBodyWithFileSchema']?.[index]?.url; @@ -2764,7 +2764,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testBodyWithQueryParams(query: string, user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testBodyWithQueryParams(query: string, user: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testBodyWithQueryParams(query, user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testBodyWithQueryParams']?.[index]?.url; @@ -2777,7 +2777,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testClientModel(client: Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testClientModel(client: Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testClientModel(client, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testClientModel']?.[index]?.url; @@ -2803,7 +2803,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, callback, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testEndpointParameters']?.[index]?.url; @@ -2823,7 +2823,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEnumParameters(enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEnumParameters(enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testEnumParameters']?.[index]?.url; @@ -2841,7 +2841,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testGroupParameters']?.[index]?.url; @@ -2854,7 +2854,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testInlineAdditionalProperties(requestBody, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testInlineAdditionalProperties']?.[index]?.url; @@ -2867,7 +2867,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testInlineFreeformAdditionalProperties']?.[index]?.url; @@ -2881,7 +2881,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testJsonFormData(param: string, param2: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testJsonFormData(param: string, param2: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testJsonFormData(param, param2, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testJsonFormData']?.[index]?.url; @@ -2897,7 +2897,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testQueryParameterCollectionFormat']?.[index]?.url; @@ -3112,7 +3112,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeHealthGet(options?: AxiosRequestConfig) { + public fakeHealthGet(options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeHealthGet(options).then((request) => request(this.axios, this.basePath)); } @@ -3123,7 +3123,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterBooleanSerialize(body?: boolean, options?: AxiosRequestConfig) { + public fakeOuterBooleanSerialize(body?: boolean, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterBooleanSerialize(body, options).then((request) => request(this.axios, this.basePath)); } @@ -3134,7 +3134,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: AxiosRequestConfig) { + public fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterCompositeSerialize(outerComposite, options).then((request) => request(this.axios, this.basePath)); } @@ -3145,7 +3145,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterNumberSerialize(body?: number, options?: AxiosRequestConfig) { + public fakeOuterNumberSerialize(body?: number, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterNumberSerialize(body, options).then((request) => request(this.axios, this.basePath)); } @@ -3156,7 +3156,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterStringSerialize(body?: string, options?: AxiosRequestConfig) { + public fakeOuterStringSerialize(body?: string, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterStringSerialize(body, options).then((request) => request(this.axios, this.basePath)); } @@ -3167,7 +3167,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public getArrayOfEnums(options?: AxiosRequestConfig) { + public getArrayOfEnums(options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).getArrayOfEnums(options).then((request) => request(this.axios, this.basePath)); } @@ -3178,7 +3178,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: AxiosRequestConfig) { + public testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testBodyWithFileSchema(fileSchemaTestClass, options).then((request) => request(this.axios, this.basePath)); } @@ -3190,7 +3190,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testBodyWithQueryParams(query: string, user: User, options?: AxiosRequestConfig) { + public testBodyWithQueryParams(query: string, user: User, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testBodyWithQueryParams(query, user, options).then((request) => request(this.axios, this.basePath)); } @@ -3202,7 +3202,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testClientModel(client: Client, options?: AxiosRequestConfig) { + public testClientModel(client: Client, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testClientModel(client, options).then((request) => request(this.axios, this.basePath)); } @@ -3227,7 +3227,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options?: AxiosRequestConfig) { + public testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, callback, options).then((request) => request(this.axios, this.basePath)); } @@ -3246,7 +3246,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testEnumParameters(enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options?: AxiosRequestConfig) { + public testEnumParameters(enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, options).then((request) => request(this.axios, this.basePath)); } @@ -3263,7 +3263,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: AxiosRequestConfig) { + public testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, options).then((request) => request(this.axios, this.basePath)); } @@ -3275,7 +3275,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: AxiosRequestConfig) { + public testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testInlineAdditionalProperties(requestBody, options).then((request) => request(this.axios, this.basePath)); } @@ -3287,7 +3287,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options?: AxiosRequestConfig) { + public testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest, options).then((request) => request(this.axios, this.basePath)); } @@ -3300,7 +3300,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testJsonFormData(param: string, param2: string, options?: AxiosRequestConfig) { + public testJsonFormData(param: string, param2: string, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testJsonFormData(param, param2, options).then((request) => request(this.axios, this.basePath)); } @@ -3315,7 +3315,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: AxiosRequestConfig) { + public testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, options).then((request) => request(this.axios, this.basePath)); } } @@ -3402,7 +3402,7 @@ export const FakeClassnameTags123ApiAxiosParamCreator = function (configuration? * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testClassname: async (client: Client, options: AxiosRequestConfig = {}): Promise => { + testClassname: async (client: Client, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'client' is not null or undefined assertParamExists('testClassname', 'client', client) const localVarPath = `/fake_classname_test`; @@ -3451,7 +3451,7 @@ export const FakeClassnameTags123ApiFp = function(configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testClassname(client: Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testClassname(client: Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testClassname(client, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeClassnameTags123Api.testClassname']?.[index]?.url; @@ -3495,7 +3495,7 @@ export class FakeClassnameTags123Api extends BaseAPI { * @throws {RequiredError} * @memberof FakeClassnameTags123Api */ - public testClassname(client: Client, options?: AxiosRequestConfig) { + public testClassname(client: Client, options?: RawAxiosRequestConfig) { return FakeClassnameTags123ApiFp(this.configuration).testClassname(client, options).then((request) => request(this.axios, this.basePath)); } } @@ -3515,7 +3515,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (pet: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (pet: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'pet' is not null or undefined assertParamExists('addPet', 'pet', pet) const localVarPath = `/pet`; @@ -3558,7 +3558,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -3600,7 +3600,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -3644,7 +3644,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -3687,7 +3687,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -3724,7 +3724,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (pet: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (pet: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'pet' is not null or undefined assertParamExists('updatePet', 'pet', pet) const localVarPath = `/pet`; @@ -3768,7 +3768,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -3820,7 +3820,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -3872,7 +3872,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFileWithRequiredFile: async (petId: number, requiredFile: File, additionalMetadata?: string, options: AxiosRequestConfig = {}): Promise => { + uploadFileWithRequiredFile: async (petId: number, requiredFile: File, additionalMetadata?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFileWithRequiredFile', 'petId', petId) // verify required parameter 'requiredFile' is not null or undefined @@ -3934,7 +3934,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(pet: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(pet: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(pet, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -3948,7 +3948,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -3961,7 +3961,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -3975,7 +3975,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -3988,7 +3988,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -4001,7 +4001,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(pet: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(pet: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(pet, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -4016,7 +4016,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -4031,7 +4031,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -4046,7 +4046,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFileWithRequiredFile(petId: number, requiredFile: File, additionalMetadata?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFileWithRequiredFile(petId: number, requiredFile: File, additionalMetadata?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFileWithRequiredFile']?.[index]?.url; @@ -4178,7 +4178,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(pet: Pet, options?: AxiosRequestConfig) { + public addPet(pet: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -4191,7 +4191,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -4203,7 +4203,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -4216,7 +4216,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -4228,7 +4228,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -4240,7 +4240,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(pet: Pet, options?: AxiosRequestConfig) { + public updatePet(pet: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -4254,7 +4254,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -4268,7 +4268,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } @@ -4282,7 +4282,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFileWithRequiredFile(petId: number, requiredFile: File, additionalMetadata?: string, options?: AxiosRequestConfig) { + public uploadFileWithRequiredFile(petId: number, requiredFile: File, additionalMetadata?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, options).then((request) => request(this.axios, this.basePath)); } } @@ -4311,7 +4311,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{order_id}` @@ -4344,7 +4344,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -4378,7 +4378,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{order_id}` @@ -4412,7 +4412,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (order: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (order: Order, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'order' is not null or undefined assertParamExists('placeOrder', 'order', order) const localVarPath = `/store/order`; @@ -4458,7 +4458,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -4470,7 +4470,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -4483,7 +4483,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -4496,7 +4496,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(order: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(order: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(order, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -4569,7 +4569,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -4580,7 +4580,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -4592,7 +4592,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -4604,7 +4604,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(order: Order, options?: AxiosRequestConfig) { + public placeOrder(order: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(order, options).then((request) => request(this.axios, this.basePath)); } } @@ -4624,7 +4624,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (user: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (user: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUser', 'user', user) const localVarPath = `/user`; @@ -4660,7 +4660,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (user: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (user: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUsersWithArrayInput', 'user', user) const localVarPath = `/user/createWithArray`; @@ -4696,7 +4696,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (user: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (user: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUsersWithListInput', 'user', user) const localVarPath = `/user/createWithList`; @@ -4732,7 +4732,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -4766,7 +4766,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -4801,7 +4801,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -4843,7 +4843,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -4875,7 +4875,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, user: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, user: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'user' is not null or undefined @@ -4924,7 +4924,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(user: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -4937,7 +4937,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(user: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(user: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -4950,7 +4950,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(user: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(user: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -4963,7 +4963,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -4976,7 +4976,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -4990,7 +4990,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -5002,7 +5002,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -5016,7 +5016,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, user: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -5131,7 +5131,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(user: User, options?: AxiosRequestConfig) { + public createUser(user: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(user, options).then((request) => request(this.axios, this.basePath)); } @@ -5143,7 +5143,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(user: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(user: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(user, options).then((request) => request(this.axios, this.basePath)); } @@ -5155,7 +5155,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(user: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(user: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(user, options).then((request) => request(this.axios, this.basePath)); } @@ -5167,7 +5167,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -5179,7 +5179,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -5192,7 +5192,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -5203,7 +5203,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -5216,7 +5216,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, user: User, options?: AxiosRequestConfig) { + public updateUser(username: string, user: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, user, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts index a249a937e0f6..ba1854123f7c 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io:80/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts index de050a37084b..53ff891d4199 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -276,7 +276,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (pet: Pet, header1?: Pet, header2?: Array, accept?: MediaType, options: AxiosRequestConfig = {}): Promise => { + addPet: async (pet: Pet, header1?: Pet, header2?: Array, accept?: MediaType, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'pet' is not null or undefined assertParamExists('addPet', 'pet', pet) const localVarPath = `/pet`; @@ -334,7 +334,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -376,7 +376,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -418,7 +418,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -459,7 +459,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -496,7 +496,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (pet: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (pet: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'pet' is not null or undefined assertParamExists('updatePet', 'pet', pet) const localVarPath = `/pet`; @@ -538,7 +538,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -590,7 +590,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -653,7 +653,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(pet: Pet, header1?: Pet, header2?: Array, accept?: MediaType, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(pet: Pet, header1?: Pet, header2?: Array, accept?: MediaType, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(pet, header1, header2, accept, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -667,7 +667,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -680,7 +680,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -694,7 +694,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -707,7 +707,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -720,7 +720,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(pet: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(pet: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(pet, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -735,7 +735,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -750,7 +750,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -876,7 +876,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(pet: Pet, header1?: Pet, header2?: Array, accept?: MediaType, options?: AxiosRequestConfig) { + public addPet(pet: Pet, header1?: Pet, header2?: Array, accept?: MediaType, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(pet, header1, header2, accept, options).then((request) => request(this.axios, this.basePath)); } @@ -889,7 +889,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -901,7 +901,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -914,7 +914,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -926,7 +926,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -938,7 +938,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(pet: Pet, options?: AxiosRequestConfig) { + public updatePet(pet: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -952,7 +952,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -966,7 +966,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -995,7 +995,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1028,7 +1028,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1062,7 +1062,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1096,7 +1096,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (order: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (order: Order, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'order' is not null or undefined assertParamExists('placeOrder', 'order', order) const localVarPath = `/store/order`; @@ -1142,7 +1142,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -1154,7 +1154,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -1167,7 +1167,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -1180,7 +1180,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(order: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(order: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(order, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -1253,7 +1253,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1264,7 +1264,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1276,7 +1276,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1288,7 +1288,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(order: Order, options?: AxiosRequestConfig) { + public placeOrder(order: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(order, options).then((request) => request(this.axios, this.basePath)); } } @@ -1308,7 +1308,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (user: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (user: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUser', 'user', user) const localVarPath = `/user`; @@ -1344,7 +1344,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (user: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (user: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUsersWithArrayInput', 'user', user) const localVarPath = `/user/createWithArray`; @@ -1380,7 +1380,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (user: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (user: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUsersWithListInput', 'user', user) const localVarPath = `/user/createWithList`; @@ -1416,7 +1416,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1450,7 +1450,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1485,7 +1485,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1527,7 +1527,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1559,7 +1559,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, user: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, user: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'user' is not null or undefined @@ -1608,7 +1608,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(user: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -1621,7 +1621,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(user: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(user: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -1634,7 +1634,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(user: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(user: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -1647,7 +1647,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -1660,7 +1660,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -1674,7 +1674,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -1686,7 +1686,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -1700,7 +1700,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, user: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -1815,7 +1815,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(user: User, options?: AxiosRequestConfig) { + public createUser(user: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(user, options).then((request) => request(this.axios, this.basePath)); } @@ -1827,7 +1827,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(user: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(user: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(user, options).then((request) => request(this.axios, this.basePath)); } @@ -1839,7 +1839,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(user: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(user: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(user, options).then((request) => request(this.axios, this.basePath)); } @@ -1851,7 +1851,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1863,7 +1863,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1876,7 +1876,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -1887,7 +1887,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -1900,7 +1900,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, user: User, options?: AxiosRequestConfig) { + public updateUser(username: string, user: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, user, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts index 02192cb47b44..b92a383a84c7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts index 5ca71ad7514a..2c8551e92540 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -1363,7 +1363,7 @@ export const AnotherFakeApiAxiosParamCreator = function (configuration?: Configu * @param {*} [options] Override http request option. * @throws {RequiredError} */ - _123testSpecialTags: async (client: Client, options: AxiosRequestConfig = {}): Promise => { + _123testSpecialTags: async (client: Client, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'client' is not null or undefined assertParamExists('_123testSpecialTags', 'client', client) const localVarPath = `/another-fake/dummy`; @@ -1409,7 +1409,7 @@ export const AnotherFakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async _123testSpecialTags(client: Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async _123testSpecialTags(client: Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator._123testSpecialTags(client, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['AnotherFakeApi._123testSpecialTags']?.[index]?.url; @@ -1453,7 +1453,7 @@ export class AnotherFakeApi extends BaseAPI { * @throws {RequiredError} * @memberof AnotherFakeApi */ - public _123testSpecialTags(client: Client, options?: AxiosRequestConfig) { + public _123testSpecialTags(client: Client, options?: RawAxiosRequestConfig) { return AnotherFakeApiFp(this.configuration)._123testSpecialTags(client, options).then((request) => request(this.axios, this.basePath)); } } @@ -1471,7 +1471,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fooGet: async (options: AxiosRequestConfig = {}): Promise => { + fooGet: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/foo`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1510,7 +1510,7 @@ export const DefaultApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fooGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fooGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fooGet(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['DefaultApi.fooGet']?.[index]?.url; @@ -1550,7 +1550,7 @@ export class DefaultApi extends BaseAPI { * @throws {RequiredError} * @memberof DefaultApi */ - public fooGet(options?: AxiosRequestConfig) { + public fooGet(options?: RawAxiosRequestConfig) { return DefaultApiFp(this.configuration).fooGet(options).then((request) => request(this.axios, this.basePath)); } } @@ -1569,7 +1569,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeHealthGet: async (options: AxiosRequestConfig = {}): Promise => { + fakeHealthGet: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/health`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1599,7 +1599,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterBooleanSerialize: async (body?: boolean, options: AxiosRequestConfig = {}): Promise => { + fakeOuterBooleanSerialize: async (body?: boolean, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/boolean`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1632,7 +1632,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterCompositeSerialize: async (outerComposite?: OuterComposite, options: AxiosRequestConfig = {}): Promise => { + fakeOuterCompositeSerialize: async (outerComposite?: OuterComposite, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/composite`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1665,7 +1665,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterNumberSerialize: async (body?: number, options: AxiosRequestConfig = {}): Promise => { + fakeOuterNumberSerialize: async (body?: number, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/number`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1698,7 +1698,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fakeOuterStringSerialize: async (body?: string, options: AxiosRequestConfig = {}): Promise => { + fakeOuterStringSerialize: async (body?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake/outer/string`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1731,7 +1731,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testBodyWithFileSchema: async (fileSchemaTestClass: FileSchemaTestClass, options: AxiosRequestConfig = {}): Promise => { + testBodyWithFileSchema: async (fileSchemaTestClass: FileSchemaTestClass, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'fileSchemaTestClass' is not null or undefined assertParamExists('testBodyWithFileSchema', 'fileSchemaTestClass', fileSchemaTestClass) const localVarPath = `/fake/body-with-file-schema`; @@ -1767,7 +1767,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testBodyWithQueryParams: async (query: string, user: User, options: AxiosRequestConfig = {}): Promise => { + testBodyWithQueryParams: async (query: string, user: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'query' is not null or undefined assertParamExists('testBodyWithQueryParams', 'query', query) // verify required parameter 'user' is not null or undefined @@ -1809,7 +1809,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testClientModel: async (client: Client, options: AxiosRequestConfig = {}): Promise => { + testClientModel: async (client: Client, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'client' is not null or undefined assertParamExists('testClientModel', 'client', client) const localVarPath = `/fake`; @@ -1858,7 +1858,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEndpointParameters: async (number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options: AxiosRequestConfig = {}): Promise => { + testEndpointParameters: async (number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'number' is not null or undefined assertParamExists('testEndpointParameters', 'number', number) // verify required parameter '_double' is not null or undefined @@ -1968,7 +1968,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testEnumParameters: async (enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options: AxiosRequestConfig = {}): Promise => { + testEnumParameters: async (enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/fake`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2041,7 +2041,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testGroupParameters: async (requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options: AxiosRequestConfig = {}): Promise => { + testGroupParameters: async (requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'requiredStringGroup' is not null or undefined assertParamExists('testGroupParameters', 'requiredStringGroup', requiredStringGroup) // verify required parameter 'requiredBooleanGroup' is not null or undefined @@ -2110,7 +2110,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testInlineAdditionalProperties: async (requestBody: { [key: string]: string; }, options: AxiosRequestConfig = {}): Promise => { + testInlineAdditionalProperties: async (requestBody: { [key: string]: string; }, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'requestBody' is not null or undefined assertParamExists('testInlineAdditionalProperties', 'requestBody', requestBody) const localVarPath = `/fake/inline-additionalProperties`; @@ -2146,7 +2146,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testInlineFreeformAdditionalProperties: async (testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options: AxiosRequestConfig = {}): Promise => { + testInlineFreeformAdditionalProperties: async (testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'testInlineFreeformAdditionalPropertiesRequest' is not null or undefined assertParamExists('testInlineFreeformAdditionalProperties', 'testInlineFreeformAdditionalPropertiesRequest', testInlineFreeformAdditionalPropertiesRequest) const localVarPath = `/fake/inline-freeform-additionalProperties`; @@ -2183,7 +2183,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testJsonFormData: async (param: string, param2: string, options: AxiosRequestConfig = {}): Promise => { + testJsonFormData: async (param: string, param2: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'param' is not null or undefined assertParamExists('testJsonFormData', 'param', param) // verify required parameter 'param2' is not null or undefined @@ -2233,7 +2233,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testQueryParameterCollectionFormat: async (pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options: AxiosRequestConfig = {}): Promise => { + testQueryParameterCollectionFormat: async (pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'pipe' is not null or undefined assertParamExists('testQueryParameterCollectionFormat', 'pipe', pipe) // verify required parameter 'ioutil' is not null or undefined @@ -2294,7 +2294,7 @@ export const FakeApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testUniqueItemsHeaderAndQueryParameterCollectionFormat: async (queryUnique: Set, headerUnique: Set, options: AxiosRequestConfig = {}): Promise => { + testUniqueItemsHeaderAndQueryParameterCollectionFormat: async (queryUnique: Set, headerUnique: Set, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'queryUnique' is not null or undefined assertParamExists('testUniqueItemsHeaderAndQueryParameterCollectionFormat', 'queryUnique', queryUnique) // verify required parameter 'headerUnique' is not null or undefined @@ -2347,7 +2347,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeHealthGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeHealthGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeHealthGet(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeHealthGet']?.[index]?.url; @@ -2359,7 +2359,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterBooleanSerialize(body?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterBooleanSerialize(body?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterBooleanSerialize(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeOuterBooleanSerialize']?.[index]?.url; @@ -2371,7 +2371,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterCompositeSerialize(outerComposite, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeOuterCompositeSerialize']?.[index]?.url; @@ -2383,7 +2383,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterNumberSerialize(body?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterNumberSerialize(body?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterNumberSerialize(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeOuterNumberSerialize']?.[index]?.url; @@ -2395,7 +2395,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async fakeOuterStringSerialize(body?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async fakeOuterStringSerialize(body?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.fakeOuterStringSerialize(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.fakeOuterStringSerialize']?.[index]?.url; @@ -2407,7 +2407,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testBodyWithFileSchema(fileSchemaTestClass, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testBodyWithFileSchema']?.[index]?.url; @@ -2420,7 +2420,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testBodyWithQueryParams(query: string, user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testBodyWithQueryParams(query: string, user: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testBodyWithQueryParams(query, user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testBodyWithQueryParams']?.[index]?.url; @@ -2433,7 +2433,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testClientModel(client: Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testClientModel(client: Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testClientModel(client, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testClientModel']?.[index]?.url; @@ -2459,7 +2459,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, callback, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testEndpointParameters']?.[index]?.url; @@ -2479,7 +2479,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testEnumParameters(enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testEnumParameters(enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testEnumParameters']?.[index]?.url; @@ -2497,7 +2497,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testGroupParameters']?.[index]?.url; @@ -2510,7 +2510,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testInlineAdditionalProperties(requestBody, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testInlineAdditionalProperties']?.[index]?.url; @@ -2523,7 +2523,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testInlineFreeformAdditionalProperties']?.[index]?.url; @@ -2537,7 +2537,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testJsonFormData(param: string, param2: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testJsonFormData(param: string, param2: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testJsonFormData(param, param2, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testJsonFormData']?.[index]?.url; @@ -2553,7 +2553,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testQueryParameterCollectionFormat']?.[index]?.url; @@ -2566,7 +2566,7 @@ export const FakeApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testUniqueItemsHeaderAndQueryParameterCollectionFormat(queryUnique: Set, headerUnique: Set, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async testUniqueItemsHeaderAndQueryParameterCollectionFormat(queryUnique: Set, headerUnique: Set, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.testUniqueItemsHeaderAndQueryParameterCollectionFormat(queryUnique, headerUnique, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeApi.testUniqueItemsHeaderAndQueryParameterCollectionFormat']?.[index]?.url; @@ -2782,7 +2782,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeHealthGet(options?: AxiosRequestConfig) { + public fakeHealthGet(options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeHealthGet(options).then((request) => request(this.axios, this.basePath)); } @@ -2793,7 +2793,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterBooleanSerialize(body?: boolean, options?: AxiosRequestConfig) { + public fakeOuterBooleanSerialize(body?: boolean, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterBooleanSerialize(body, options).then((request) => request(this.axios, this.basePath)); } @@ -2804,7 +2804,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: AxiosRequestConfig) { + public fakeOuterCompositeSerialize(outerComposite?: OuterComposite, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterCompositeSerialize(outerComposite, options).then((request) => request(this.axios, this.basePath)); } @@ -2815,7 +2815,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterNumberSerialize(body?: number, options?: AxiosRequestConfig) { + public fakeOuterNumberSerialize(body?: number, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterNumberSerialize(body, options).then((request) => request(this.axios, this.basePath)); } @@ -2826,7 +2826,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public fakeOuterStringSerialize(body?: string, options?: AxiosRequestConfig) { + public fakeOuterStringSerialize(body?: string, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).fakeOuterStringSerialize(body, options).then((request) => request(this.axios, this.basePath)); } @@ -2837,7 +2837,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: AxiosRequestConfig) { + public testBodyWithFileSchema(fileSchemaTestClass: FileSchemaTestClass, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testBodyWithFileSchema(fileSchemaTestClass, options).then((request) => request(this.axios, this.basePath)); } @@ -2849,7 +2849,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testBodyWithQueryParams(query: string, user: User, options?: AxiosRequestConfig) { + public testBodyWithQueryParams(query: string, user: User, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testBodyWithQueryParams(query, user, options).then((request) => request(this.axios, this.basePath)); } @@ -2861,7 +2861,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testClientModel(client: Client, options?: AxiosRequestConfig) { + public testClientModel(client: Client, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testClientModel(client, options).then((request) => request(this.axios, this.basePath)); } @@ -2886,7 +2886,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options?: AxiosRequestConfig) { + public testEndpointParameters(number: number, _double: number, patternWithoutDelimiter: string, _byte: string, integer?: number, int32?: number, int64?: number, _float?: number, string?: string, binary?: File, date?: string, dateTime?: string, password?: string, callback?: string, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, callback, options).then((request) => request(this.axios, this.basePath)); } @@ -2905,7 +2905,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testEnumParameters(enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options?: AxiosRequestConfig) { + public testEnumParameters(enumHeaderStringArray?: Array, enumHeaderString?: TestEnumParametersEnumHeaderStringEnum, enumQueryStringArray?: Array, enumQueryString?: TestEnumParametersEnumQueryStringEnum, enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum, enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum, enumFormStringArray?: Array, enumFormString?: TestEnumParametersEnumFormStringEnum, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, options).then((request) => request(this.axios, this.basePath)); } @@ -2922,7 +2922,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: AxiosRequestConfig) { + public testGroupParameters(requiredStringGroup: number, requiredBooleanGroup: boolean, requiredInt64Group: number, stringGroup?: number, booleanGroup?: boolean, int64Group?: number, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, options).then((request) => request(this.axios, this.basePath)); } @@ -2934,7 +2934,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: AxiosRequestConfig) { + public testInlineAdditionalProperties(requestBody: { [key: string]: string; }, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testInlineAdditionalProperties(requestBody, options).then((request) => request(this.axios, this.basePath)); } @@ -2946,7 +2946,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options?: AxiosRequestConfig) { + public testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest, options).then((request) => request(this.axios, this.basePath)); } @@ -2959,7 +2959,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testJsonFormData(param: string, param2: string, options?: AxiosRequestConfig) { + public testJsonFormData(param: string, param2: string, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testJsonFormData(param, param2, options).then((request) => request(this.axios, this.basePath)); } @@ -2974,7 +2974,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: AxiosRequestConfig) { + public testQueryParameterCollectionFormat(pipe: Array, ioutil: Array, http: Array, url: Array, context: Array, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, options).then((request) => request(this.axios, this.basePath)); } @@ -2986,7 +2986,7 @@ export class FakeApi extends BaseAPI { * @throws {RequiredError} * @memberof FakeApi */ - public testUniqueItemsHeaderAndQueryParameterCollectionFormat(queryUnique: Set, headerUnique: Set, options?: AxiosRequestConfig) { + public testUniqueItemsHeaderAndQueryParameterCollectionFormat(queryUnique: Set, headerUnique: Set, options?: RawAxiosRequestConfig) { return FakeApiFp(this.configuration).testUniqueItemsHeaderAndQueryParameterCollectionFormat(queryUnique, headerUnique, options).then((request) => request(this.axios, this.basePath)); } } @@ -3073,7 +3073,7 @@ export const FakeClassnameTags123ApiAxiosParamCreator = function (configuration? * @param {*} [options] Override http request option. * @throws {RequiredError} */ - testClassname: async (client: Client, options: AxiosRequestConfig = {}): Promise => { + testClassname: async (client: Client, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'client' is not null or undefined assertParamExists('testClassname', 'client', client) const localVarPath = `/fake_classname_test`; @@ -3122,7 +3122,7 @@ export const FakeClassnameTags123ApiFp = function(configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async testClassname(client: Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async testClassname(client: Client, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.testClassname(client, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['FakeClassnameTags123Api.testClassname']?.[index]?.url; @@ -3166,7 +3166,7 @@ export class FakeClassnameTags123Api extends BaseAPI { * @throws {RequiredError} * @memberof FakeClassnameTags123Api */ - public testClassname(client: Client, options?: AxiosRequestConfig) { + public testClassname(client: Client, options?: RawAxiosRequestConfig) { return FakeClassnameTags123ApiFp(this.configuration).testClassname(client, options).then((request) => request(this.axios, this.basePath)); } } @@ -3186,7 +3186,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (pet: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (pet: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'pet' is not null or undefined assertParamExists('addPet', 'pet', pet) const localVarPath = `/pet`; @@ -3229,7 +3229,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -3271,7 +3271,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -3315,7 +3315,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -3358,7 +3358,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -3395,7 +3395,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (pet: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (pet: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'pet' is not null or undefined assertParamExists('updatePet', 'pet', pet) const localVarPath = `/pet`; @@ -3439,7 +3439,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -3491,7 +3491,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -3543,7 +3543,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFileWithRequiredFile: async (petId: number, requiredFile: File, additionalMetadata?: string, options: AxiosRequestConfig = {}): Promise => { + uploadFileWithRequiredFile: async (petId: number, requiredFile: File, additionalMetadata?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFileWithRequiredFile', 'petId', petId) // verify required parameter 'requiredFile' is not null or undefined @@ -3605,7 +3605,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(pet: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(pet: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(pet, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -3619,7 +3619,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -3632,7 +3632,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -3646,7 +3646,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -3659,7 +3659,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -3672,7 +3672,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(pet: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(pet: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(pet, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -3687,7 +3687,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -3702,7 +3702,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -3717,7 +3717,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFileWithRequiredFile(petId: number, requiredFile: File, additionalMetadata?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFileWithRequiredFile(petId: number, requiredFile: File, additionalMetadata?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFileWithRequiredFile']?.[index]?.url; @@ -3849,7 +3849,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(pet: Pet, options?: AxiosRequestConfig) { + public addPet(pet: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -3862,7 +3862,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -3874,7 +3874,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -3887,7 +3887,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -3899,7 +3899,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -3911,7 +3911,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(pet: Pet, options?: AxiosRequestConfig) { + public updatePet(pet: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(pet, options).then((request) => request(this.axios, this.basePath)); } @@ -3925,7 +3925,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -3939,7 +3939,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } @@ -3953,7 +3953,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFileWithRequiredFile(petId: number, requiredFile: File, additionalMetadata?: string, options?: AxiosRequestConfig) { + public uploadFileWithRequiredFile(petId: number, requiredFile: File, additionalMetadata?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, options).then((request) => request(this.axios, this.basePath)); } } @@ -3982,7 +3982,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{order_id}` @@ -4015,7 +4015,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -4049,7 +4049,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{order_id}` @@ -4083,7 +4083,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (order: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (order: Order, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'order' is not null or undefined assertParamExists('placeOrder', 'order', order) const localVarPath = `/store/order`; @@ -4129,7 +4129,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -4141,7 +4141,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -4154,7 +4154,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -4167,7 +4167,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(order: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(order: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(order, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -4240,7 +4240,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -4251,7 +4251,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -4263,7 +4263,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -4275,7 +4275,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(order: Order, options?: AxiosRequestConfig) { + public placeOrder(order: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(order, options).then((request) => request(this.axios, this.basePath)); } } @@ -4295,7 +4295,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (user: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (user: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUser', 'user', user) const localVarPath = `/user`; @@ -4331,7 +4331,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (user: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (user: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUsersWithArrayInput', 'user', user) const localVarPath = `/user/createWithArray`; @@ -4367,7 +4367,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (user: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (user: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'user' is not null or undefined assertParamExists('createUsersWithListInput', 'user', user) const localVarPath = `/user/createWithList`; @@ -4403,7 +4403,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -4437,7 +4437,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -4472,7 +4472,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -4514,7 +4514,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -4546,7 +4546,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, user: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, user: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'user' is not null or undefined @@ -4595,7 +4595,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(user: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -4608,7 +4608,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(user: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(user: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -4621,7 +4621,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(user: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(user: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -4634,7 +4634,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -4647,7 +4647,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -4661,7 +4661,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -4673,7 +4673,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -4687,7 +4687,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, user: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, user, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -4802,7 +4802,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(user: User, options?: AxiosRequestConfig) { + public createUser(user: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(user, options).then((request) => request(this.axios, this.basePath)); } @@ -4814,7 +4814,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(user: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(user: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(user, options).then((request) => request(this.axios, this.basePath)); } @@ -4826,7 +4826,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(user: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(user: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(user, options).then((request) => request(this.axios, this.basePath)); } @@ -4838,7 +4838,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -4850,7 +4850,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -4863,7 +4863,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -4874,7 +4874,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -4887,7 +4887,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, user: User, options?: AxiosRequestConfig) { + public updateUser(username: string, user: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, user, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts index a249a937e0f6..ba1854123f7c 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io:80/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts index ad1bdfe075a7..aa2518ef893f 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -259,7 +259,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -300,7 +300,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -342,7 +342,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -384,7 +384,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -425,7 +425,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -462,7 +462,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -504,7 +504,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -556,7 +556,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -616,7 +616,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -630,7 +630,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -643,7 +643,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -657,7 +657,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -670,7 +670,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -683,7 +683,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -698,7 +698,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -713,7 +713,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -832,7 +832,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - addPet(body: Pet, options?: AxiosRequestConfig): AxiosPromise; + addPet(body: Pet, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -843,7 +843,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): AxiosPromise; + deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Multiple status values can be provided with comma separated strings @@ -853,7 +853,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - findPetsByStatus(status: Array, options?: AxiosRequestConfig): AxiosPromise>; + findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): AxiosPromise>; /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -864,7 +864,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - findPetsByTags(tags: Array, options?: AxiosRequestConfig): AxiosPromise>; + findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): AxiosPromise>; /** * Returns a single pet @@ -874,7 +874,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - getPetById(petId: number, options?: AxiosRequestConfig): AxiosPromise; + getPetById(petId: number, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -884,7 +884,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - updatePet(body: Pet, options?: AxiosRequestConfig): AxiosPromise; + updatePet(body: Pet, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -896,7 +896,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): AxiosPromise; + updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -908,7 +908,7 @@ export interface PetApiInterface { * @throws {RequiredError} * @memberof PetApiInterface */ - uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): AxiosPromise; + uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): AxiosPromise; } @@ -927,7 +927,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: AxiosRequestConfig) { + public addPet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -940,7 +940,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -952,7 +952,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -965,7 +965,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -977,7 +977,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -989,7 +989,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: AxiosRequestConfig) { + public updatePet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1003,7 +1003,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -1017,7 +1017,7 @@ export class PetApi extends BaseAPI implements PetApiInterface { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -1046,7 +1046,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1079,7 +1079,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1113,7 +1113,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1147,7 +1147,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (body: Order, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('placeOrder', 'body', body) const localVarPath = `/store/order`; @@ -1193,7 +1193,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -1205,7 +1205,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -1218,7 +1218,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -1231,7 +1231,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -1303,7 +1303,7 @@ export interface StoreApiInterface { * @throws {RequiredError} * @memberof StoreApiInterface */ - deleteOrder(orderId: string, options?: AxiosRequestConfig): AxiosPromise; + deleteOrder(orderId: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Returns a map of status codes to quantities @@ -1312,7 +1312,7 @@ export interface StoreApiInterface { * @throws {RequiredError} * @memberof StoreApiInterface */ - getInventory(options?: AxiosRequestConfig): AxiosPromise<{ [key: string]: number; }>; + getInventory(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: number; }>; /** * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions @@ -1322,7 +1322,7 @@ export interface StoreApiInterface { * @throws {RequiredError} * @memberof StoreApiInterface */ - getOrderById(orderId: number, options?: AxiosRequestConfig): AxiosPromise; + getOrderById(orderId: number, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -1332,7 +1332,7 @@ export interface StoreApiInterface { * @throws {RequiredError} * @memberof StoreApiInterface */ - placeOrder(body: Order, options?: AxiosRequestConfig): AxiosPromise; + placeOrder(body: Order, options?: RawAxiosRequestConfig): AxiosPromise; } @@ -1351,7 +1351,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1362,7 +1362,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1374,7 +1374,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1386,7 +1386,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body: Order, options?: AxiosRequestConfig) { + public placeOrder(body: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1406,7 +1406,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1442,7 +1442,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1478,7 +1478,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1514,7 +1514,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1548,7 +1548,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1583,7 +1583,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1625,7 +1625,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1657,7 +1657,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1706,7 +1706,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -1719,7 +1719,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -1732,7 +1732,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -1745,7 +1745,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -1758,7 +1758,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -1772,7 +1772,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -1784,7 +1784,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -1798,7 +1798,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -1912,7 +1912,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - createUser(body: User, options?: AxiosRequestConfig): AxiosPromise; + createUser(body: User, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -1922,7 +1922,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): AxiosPromise; + createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -1932,7 +1932,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - createUsersWithListInput(body: Array, options?: AxiosRequestConfig): AxiosPromise; + createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig): AxiosPromise; /** * This can only be done by the logged in user. @@ -1942,7 +1942,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - deleteUser(username: string, options?: AxiosRequestConfig): AxiosPromise; + deleteUser(username: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -1952,7 +1952,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - getUserByName(username: string, options?: AxiosRequestConfig): AxiosPromise; + getUserByName(username: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -1963,7 +1963,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - loginUser(username: string, password: string, options?: AxiosRequestConfig): AxiosPromise; + loginUser(username: string, password: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * @@ -1972,7 +1972,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - logoutUser(options?: AxiosRequestConfig): AxiosPromise; + logoutUser(options?: RawAxiosRequestConfig): AxiosPromise; /** * This can only be done by the logged in user. @@ -1983,7 +1983,7 @@ export interface UserApiInterface { * @throws {RequiredError} * @memberof UserApiInterface */ - updateUser(username: string, body: User, options?: AxiosRequestConfig): AxiosPromise; + updateUser(username: string, body: User, options?: RawAxiosRequestConfig): AxiosPromise; } @@ -2002,7 +2002,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: AxiosRequestConfig) { + public createUser(body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -2014,7 +2014,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -2026,7 +2026,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -2038,7 +2038,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -2050,7 +2050,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -2063,7 +2063,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -2074,7 +2074,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -2087,7 +2087,7 @@ export class UserApi extends BaseAPI implements UserApiInterface { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: AxiosRequestConfig) { + public updateUser(username: string, body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts index 02192cb47b44..b92a383a84c7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/api.ts b/samples/client/petstore/typescript-axios/builds/with-node-imports/api.ts index e5172e43994f..bc170c05d884 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // URLSearchParams not necessarily used // @ts-ignore @@ -263,7 +263,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -304,7 +304,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -346,7 +346,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -388,7 +388,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -429,7 +429,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -466,7 +466,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -508,7 +508,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -560,7 +560,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -620,7 +620,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -634,7 +634,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -647,7 +647,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -661,7 +661,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -674,7 +674,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -687,7 +687,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -702,7 +702,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -717,7 +717,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -837,7 +837,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: AxiosRequestConfig) { + public addPet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -850,7 +850,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -862,7 +862,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -875,7 +875,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -887,7 +887,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -899,7 +899,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: AxiosRequestConfig) { + public updatePet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -913,7 +913,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -927,7 +927,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -956,7 +956,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -989,7 +989,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1023,7 +1023,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1057,7 +1057,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body?: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (body?: Order, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/order`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1101,7 +1101,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -1113,7 +1113,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -1126,7 +1126,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -1139,7 +1139,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body?: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body?: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -1212,7 +1212,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1223,7 +1223,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1235,7 +1235,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1247,7 +1247,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body?: Order, options?: AxiosRequestConfig) { + public placeOrder(body?: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1267,7 +1267,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1303,7 +1303,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1339,7 +1339,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1375,7 +1375,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1409,7 +1409,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1444,7 +1444,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1486,7 +1486,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1518,7 +1518,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1567,7 +1567,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -1580,7 +1580,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -1593,7 +1593,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -1606,7 +1606,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -1619,7 +1619,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -1633,7 +1633,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -1645,7 +1645,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -1659,7 +1659,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -1774,7 +1774,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: AxiosRequestConfig) { + public createUser(body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1786,7 +1786,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1798,7 +1798,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1810,7 +1810,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1822,7 +1822,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1835,7 +1835,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -1846,7 +1846,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -1859,7 +1859,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: AxiosRequestConfig) { + public updateUser(username: string, body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts b/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts index 02192cb47b44..b92a383a84c7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts index 63f691b79e4f..ffdd77ed2e6e 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts @@ -14,7 +14,7 @@ import type { Configuration } from '../../../configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -38,7 +38,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -79,7 +79,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -121,7 +121,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -163,7 +163,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -204,7 +204,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -241,7 +241,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -283,7 +283,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -335,7 +335,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -395,7 +395,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -409,7 +409,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -422,7 +422,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -436,7 +436,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -449,7 +449,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -462,7 +462,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -477,7 +477,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -492,7 +492,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -612,7 +612,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: AxiosRequestConfig) { + public addPet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -625,7 +625,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -637,7 +637,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -650,7 +650,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -662,7 +662,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -674,7 +674,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: AxiosRequestConfig) { + public updatePet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -688,7 +688,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -702,7 +702,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts index c1bcc6be0fa2..e65822ad40eb 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts @@ -14,7 +14,7 @@ import type { Configuration } from '../../../configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -36,7 +36,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -69,7 +69,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -103,7 +103,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -137,7 +137,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (body: Order, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('placeOrder', 'body', body) const localVarPath = `/store/order`; @@ -183,7 +183,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -195,7 +195,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -208,7 +208,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -221,7 +221,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -294,7 +294,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -305,7 +305,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -317,7 +317,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -329,7 +329,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body: Order, options?: AxiosRequestConfig) { + public placeOrder(body: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts index a8d422b7a2cb..2840fefac7d4 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts @@ -14,7 +14,7 @@ import type { Configuration } from '../../../configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -36,7 +36,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -72,7 +72,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -108,7 +108,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -144,7 +144,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -178,7 +178,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -213,7 +213,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -255,7 +255,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -287,7 +287,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -336,7 +336,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -349,7 +349,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -362,7 +362,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -375,7 +375,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -388,7 +388,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -402,7 +402,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -414,7 +414,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -428,7 +428,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -543,7 +543,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: AxiosRequestConfig) { + public createUser(body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -555,7 +555,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -567,7 +567,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -579,7 +579,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -591,7 +591,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -604,7 +604,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -615,7 +615,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -628,7 +628,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: AxiosRequestConfig) { + public updateUser(username: string, body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts index 02192cb47b44..b92a383a84c7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json index 25c34a0273ad..81cacb217244 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json @@ -22,7 +22,7 @@ "prepare": "npm run build" }, "dependencies": { - "axios": "^0.27.2" + "axios": "^1.6.1" }, "devDependencies": { "@types/node": "^12.11.5", diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts index b2d5f4574057..f74593fe5bb7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -259,7 +259,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -300,7 +300,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -342,7 +342,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -384,7 +384,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -425,7 +425,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -462,7 +462,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -504,7 +504,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -556,7 +556,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -616,7 +616,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -630,7 +630,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -643,7 +643,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -657,7 +657,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -670,7 +670,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -683,7 +683,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -698,7 +698,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -713,7 +713,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -833,7 +833,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: AxiosRequestConfig) { + public addPet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -846,7 +846,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -858,7 +858,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -871,7 +871,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -883,7 +883,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -895,7 +895,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: AxiosRequestConfig) { + public updatePet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -909,7 +909,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -923,7 +923,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -952,7 +952,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -985,7 +985,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1019,7 +1019,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1053,7 +1053,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (body: Order, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('placeOrder', 'body', body) const localVarPath = `/store/order`; @@ -1099,7 +1099,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -1111,7 +1111,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -1124,7 +1124,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -1137,7 +1137,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -1210,7 +1210,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1221,7 +1221,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1233,7 +1233,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1245,7 +1245,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body: Order, options?: AxiosRequestConfig) { + public placeOrder(body: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1265,7 +1265,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1301,7 +1301,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1337,7 +1337,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1373,7 +1373,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1407,7 +1407,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1442,7 +1442,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1484,7 +1484,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1516,7 +1516,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1565,7 +1565,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -1578,7 +1578,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -1591,7 +1591,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -1604,7 +1604,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -1617,7 +1617,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -1631,7 +1631,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -1643,7 +1643,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -1657,7 +1657,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -1772,7 +1772,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: AxiosRequestConfig) { + public createUser(body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1784,7 +1784,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1796,7 +1796,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1808,7 +1808,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1820,7 +1820,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1833,7 +1833,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -1844,7 +1844,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -1857,7 +1857,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: AxiosRequestConfig) { + public updateUser(username: string, body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts index 02192cb47b44..b92a383a84c7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/package-lock.json b/samples/client/petstore/typescript-axios/builds/with-npm-version/package-lock.json index 014e497001ad..1afa264fc3ca 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/package-lock.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "Unlicense", "dependencies": { - "axios": "^0.26.1" + "axios": "^1.6.1" }, "devDependencies": { "@types/node": "^12.11.5", @@ -22,18 +22,44 @@ "integrity": "sha512-FW0q7NI8UnjbKrJK8NGr6QXY69ATw9IFe6ItIo5yozPwA9DU/xkhiPddctUVyrmFXvyFYerYgQak/qu200UBDw==", "dev": true }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, "node_modules/axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", + "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", "dependencies": { - "follow-redirects": "^1.14.8" + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" } }, "node_modules/follow-redirects": { - "version": "1.14.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", - "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", "funding": [ { "type": "individual", @@ -49,6 +75,43 @@ } } }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/typescript": { "version": "4.6.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", @@ -70,18 +133,66 @@ "integrity": "sha512-FW0q7NI8UnjbKrJK8NGr6QXY69ATw9IFe6ItIo5yozPwA9DU/xkhiPddctUVyrmFXvyFYerYgQak/qu200UBDw==", "dev": true }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, "axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", + "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", "requires": { - "follow-redirects": "^1.14.8" + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, "follow-redirects": { - "version": "1.14.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", - "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==" + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==" + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, "typescript": { "version": "4.6.3", diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json b/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json index 25c34a0273ad..81cacb217244 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json @@ -22,7 +22,7 @@ "prepare": "npm run build" }, "dependencies": { - "axios": "^0.27.2" + "axios": "^1.6.1" }, "devDependencies": { "@types/node": "^12.11.5", diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts index e3f256f0e68f..84cf6aa82227 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -259,7 +259,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -300,7 +300,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -342,7 +342,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -384,7 +384,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -425,7 +425,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -462,7 +462,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -504,7 +504,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -556,7 +556,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -616,7 +616,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -630,7 +630,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -643,7 +643,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -657,7 +657,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -670,7 +670,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -683,7 +683,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -698,7 +698,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -713,7 +713,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -975,7 +975,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(requestParameters: PetApiAddPetRequest, options?: AxiosRequestConfig) { + public addPet(requestParameters: PetApiAddPetRequest, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } @@ -987,7 +987,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(requestParameters: PetApiDeletePetRequest, options?: AxiosRequestConfig) { + public deletePet(requestParameters: PetApiDeletePetRequest, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(requestParameters.petId, requestParameters.apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -999,7 +999,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(requestParameters: PetApiFindPetsByStatusRequest, options?: AxiosRequestConfig) { + public findPetsByStatus(requestParameters: PetApiFindPetsByStatusRequest, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(requestParameters.status, options).then((request) => request(this.axios, this.basePath)); } @@ -1012,7 +1012,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(requestParameters: PetApiFindPetsByTagsRequest, options?: AxiosRequestConfig) { + public findPetsByTags(requestParameters: PetApiFindPetsByTagsRequest, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(requestParameters.tags, options).then((request) => request(this.axios, this.basePath)); } @@ -1024,7 +1024,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(requestParameters: PetApiGetPetByIdRequest, options?: AxiosRequestConfig) { + public getPetById(requestParameters: PetApiGetPetByIdRequest, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(requestParameters.petId, options).then((request) => request(this.axios, this.basePath)); } @@ -1036,7 +1036,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(requestParameters: PetApiUpdatePetRequest, options?: AxiosRequestConfig) { + public updatePet(requestParameters: PetApiUpdatePetRequest, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } @@ -1048,7 +1048,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(requestParameters: PetApiUpdatePetWithFormRequest, options?: AxiosRequestConfig) { + public updatePetWithForm(requestParameters: PetApiUpdatePetWithFormRequest, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(requestParameters.petId, requestParameters.name, requestParameters.status, options).then((request) => request(this.axios, this.basePath)); } @@ -1060,7 +1060,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(requestParameters: PetApiUploadFileRequest, options?: AxiosRequestConfig) { + public uploadFile(requestParameters: PetApiUploadFileRequest, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(requestParameters.petId, requestParameters.additionalMetadata, requestParameters.file, options).then((request) => request(this.axios, this.basePath)); } } @@ -1089,7 +1089,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1122,7 +1122,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1156,7 +1156,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1190,7 +1190,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body?: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (body?: Order, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/order`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1234,7 +1234,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -1246,7 +1246,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -1259,7 +1259,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -1272,7 +1272,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body?: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body?: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -1387,7 +1387,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(requestParameters: StoreApiDeleteOrderRequest, options?: AxiosRequestConfig) { + public deleteOrder(requestParameters: StoreApiDeleteOrderRequest, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(requestParameters.orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1398,7 +1398,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1410,7 +1410,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(requestParameters: StoreApiGetOrderByIdRequest, options?: AxiosRequestConfig) { + public getOrderById(requestParameters: StoreApiGetOrderByIdRequest, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(requestParameters.orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1422,7 +1422,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(requestParameters: StoreApiPlaceOrderRequest = {}, options?: AxiosRequestConfig) { + public placeOrder(requestParameters: StoreApiPlaceOrderRequest = {}, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1442,7 +1442,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1478,7 +1478,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1514,7 +1514,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1550,7 +1550,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1584,7 +1584,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1619,7 +1619,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1661,7 +1661,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1693,7 +1693,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1742,7 +1742,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -1755,7 +1755,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -1768,7 +1768,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -1781,7 +1781,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -1794,7 +1794,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -1808,7 +1808,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -1820,7 +1820,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -1834,7 +1834,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -2059,7 +2059,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(requestParameters: UserApiCreateUserRequest, options?: AxiosRequestConfig) { + public createUser(requestParameters: UserApiCreateUserRequest, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } @@ -2071,7 +2071,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(requestParameters: UserApiCreateUsersWithArrayInputRequest, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(requestParameters: UserApiCreateUsersWithArrayInputRequest, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } @@ -2083,7 +2083,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(requestParameters: UserApiCreateUsersWithListInputRequest, options?: AxiosRequestConfig) { + public createUsersWithListInput(requestParameters: UserApiCreateUsersWithListInputRequest, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } @@ -2095,7 +2095,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(requestParameters: UserApiDeleteUserRequest, options?: AxiosRequestConfig) { + public deleteUser(requestParameters: UserApiDeleteUserRequest, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(requestParameters.username, options).then((request) => request(this.axios, this.basePath)); } @@ -2107,7 +2107,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(requestParameters: UserApiGetUserByNameRequest, options?: AxiosRequestConfig) { + public getUserByName(requestParameters: UserApiGetUserByNameRequest, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(requestParameters.username, options).then((request) => request(this.axios, this.basePath)); } @@ -2119,7 +2119,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(requestParameters: UserApiLoginUserRequest, options?: AxiosRequestConfig) { + public loginUser(requestParameters: UserApiLoginUserRequest, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(requestParameters.username, requestParameters.password, options).then((request) => request(this.axios, this.basePath)); } @@ -2130,7 +2130,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -2142,7 +2142,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(requestParameters: UserApiUpdateUserRequest, options?: AxiosRequestConfig) { + public updateUser(requestParameters: UserApiUpdateUserRequest, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(requestParameters.username, requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts index 02192cb47b44..b92a383a84c7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts index 84ccb5088e6a..2742f3d7e273 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts @@ -14,7 +14,7 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore @@ -263,7 +263,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + addPet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('addPet', 'body', body) const localVarPath = `/pet`; @@ -304,7 +304,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise => { + deletePet: async (petId: number, apiKey?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('deletePet', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -346,7 +346,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - findPetsByStatus: async (status: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByStatus: async (status: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'status' is not null or undefined assertParamExists('findPetsByStatus', 'status', status) const localVarPath = `/pet/findByStatus`; @@ -388,7 +388,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @deprecated * @throws {RequiredError} */ - findPetsByTags: async (tags: Array, options: AxiosRequestConfig = {}): Promise => { + findPetsByTags: async (tags: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'tags' is not null or undefined assertParamExists('findPetsByTags', 'tags', tags) const localVarPath = `/pet/findByTags`; @@ -429,7 +429,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise => { + getPetById: async (petId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('getPetById', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -466,7 +466,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise => { + updatePet: async (body: Pet, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('updatePet', 'body', body) const localVarPath = `/pet`; @@ -508,7 +508,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise => { + updatePetWithForm: async (petId: number, name?: string, status?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('updatePetWithForm', 'petId', petId) const localVarPath = `/pet/{petId}` @@ -560,7 +560,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (petId: number, additionalMetadata?: string, file?: File, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'petId' is not null or undefined assertParamExists('uploadFile', 'petId', petId) const localVarPath = `/pet/{petId}/uploadImage` @@ -620,7 +620,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async addPet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.addPet']?.[index]?.url; @@ -634,7 +634,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.deletePet']?.[index]?.url; @@ -647,7 +647,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async findPetsByStatus(status: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByStatus(status: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByStatus']?.[index]?.url; @@ -661,7 +661,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @deprecated * @throws {RequiredError} */ - async findPetsByTags(tags: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + async findPetsByTags(tags: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.findPetsByTags']?.[index]?.url; @@ -674,7 +674,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getPetById(petId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.getPetById']?.[index]?.url; @@ -687,7 +687,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePet(body: Pet, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePet']?.[index]?.url; @@ -702,7 +702,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.updatePetWithForm']?.[index]?.url; @@ -717,7 +717,7 @@ export const PetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PetApi.uploadFile']?.[index]?.url; @@ -837,7 +837,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public addPet(body: Pet, options?: AxiosRequestConfig) { + public addPet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -850,7 +850,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) { + public deletePet(petId: number, apiKey?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath)); } @@ -862,7 +862,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByStatus(status: Array, options?: AxiosRequestConfig) { + public findPetsByStatus(status: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath)); } @@ -875,7 +875,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public findPetsByTags(tags: Array, options?: AxiosRequestConfig) { + public findPetsByTags(tags: Array, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath)); } @@ -887,7 +887,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public getPetById(petId: number, options?: AxiosRequestConfig) { + public getPetById(petId: number, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath)); } @@ -899,7 +899,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePet(body: Pet, options?: AxiosRequestConfig) { + public updatePet(body: Pet, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath)); } @@ -913,7 +913,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) { + public updatePetWithForm(petId: number, name?: string, status?: string, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath)); } @@ -927,7 +927,7 @@ export class PetApi extends BaseAPI { * @throws {RequiredError} * @memberof PetApi */ - public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: AxiosRequestConfig) { + public uploadFile(petId: number, additionalMetadata?: string, file?: File, options?: RawAxiosRequestConfig) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } } @@ -956,7 +956,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise => { + deleteOrder: async (orderId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('deleteOrder', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -989,7 +989,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getInventory: async (options: AxiosRequestConfig = {}): Promise => { + getInventory: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/store/inventory`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1023,7 +1023,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise => { + getOrderById: async (orderId: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'orderId' is not null or undefined assertParamExists('getOrderById', 'orderId', orderId) const localVarPath = `/store/order/{orderId}` @@ -1057,7 +1057,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise => { + placeOrder: async (body: Order, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('placeOrder', 'body', body) const localVarPath = `/store/order`; @@ -1103,7 +1103,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.deleteOrder']?.[index]?.url; @@ -1115,7 +1115,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + async getInventory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getInventory']?.[index]?.url; @@ -1128,7 +1128,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getOrderById(orderId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.getOrderById']?.[index]?.url; @@ -1141,7 +1141,7 @@ export const StoreApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body: Order, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['StoreApi.placeOrder']?.[index]?.url; @@ -1214,7 +1214,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public deleteOrder(orderId: string, options?: AxiosRequestConfig) { + public deleteOrder(orderId: string, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1225,7 +1225,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getInventory(options?: AxiosRequestConfig) { + public getInventory(options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); } @@ -1237,7 +1237,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public getOrderById(orderId: number, options?: AxiosRequestConfig) { + public getOrderById(orderId: number, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath)); } @@ -1249,7 +1249,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(body: Order, options?: AxiosRequestConfig) { + public placeOrder(body: Order, options?: RawAxiosRequestConfig) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } } @@ -1269,7 +1269,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUser: async (body: User, options: AxiosRequestConfig = {}): Promise => { + createUser: async (body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUser', 'body', body) const localVarPath = `/user`; @@ -1305,7 +1305,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithArrayInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithArrayInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithArrayInput', 'body', body) const localVarPath = `/user/createWithArray`; @@ -1341,7 +1341,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createUsersWithListInput: async (body: Array, options: AxiosRequestConfig = {}): Promise => { + createUsersWithListInput: async (body: Array, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createUsersWithListInput', 'body', body) const localVarPath = `/user/createWithList`; @@ -1377,7 +1377,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise => { + deleteUser: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('deleteUser', 'username', username) const localVarPath = `/user/{username}` @@ -1411,7 +1411,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise => { + getUserByName: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('getUserByName', 'username', username) const localVarPath = `/user/{username}` @@ -1446,7 +1446,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise => { + loginUser: async (username: string, password: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('loginUser', 'username', username) // verify required parameter 'password' is not null or undefined @@ -1488,7 +1488,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - logoutUser: async (options: AxiosRequestConfig = {}): Promise => { + logoutUser: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1520,7 +1520,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise => { + updateUser: async (username: string, body: User, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'username' is not null or undefined assertParamExists('updateUser', 'username', username) // verify required parameter 'body' is not null or undefined @@ -1569,7 +1569,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUser(body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUser']?.[index]?.url; @@ -1582,7 +1582,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithArrayInput']?.[index]?.url; @@ -1595,7 +1595,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createUsersWithListInput(body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.createUsersWithListInput']?.[index]?.url; @@ -1608,7 +1608,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async deleteUser(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.deleteUser']?.[index]?.url; @@ -1621,7 +1621,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getUserByName(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.getUserByName']?.[index]?.url; @@ -1635,7 +1635,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async loginUser(username: string, password: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.loginUser']?.[index]?.url; @@ -1647,7 +1647,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async logoutUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.logoutUser']?.[index]?.url; @@ -1661,7 +1661,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async updateUser(username: string, body: User, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['UserApi.updateUser']?.[index]?.url; @@ -1776,7 +1776,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUser(body: User, options?: AxiosRequestConfig) { + public createUser(body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1788,7 +1788,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithArrayInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithArrayInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1800,7 +1800,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public createUsersWithListInput(body: Array, options?: AxiosRequestConfig) { + public createUsersWithListInput(body: Array, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath)); } @@ -1812,7 +1812,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public deleteUser(username: string, options?: AxiosRequestConfig) { + public deleteUser(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1824,7 +1824,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public getUserByName(username: string, options?: AxiosRequestConfig) { + public getUserByName(username: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath)); } @@ -1837,7 +1837,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public loginUser(username: string, password: string, options?: AxiosRequestConfig) { + public loginUser(username: string, password: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath)); } @@ -1848,7 +1848,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public logoutUser(options?: AxiosRequestConfig) { + public logoutUser(options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); } @@ -1861,7 +1861,7 @@ export class UserApi extends BaseAPI { * @throws {RequiredError} * @memberof UserApi */ - public updateUser(username: string, body: User, options?: AxiosRequestConfig) { + public updateUser(username: string, body: User, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts index 02192cb47b44..b92a383a84c7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts @@ -16,7 +16,7 @@ import type { Configuration } from './configuration'; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); @@ -39,7 +39,7 @@ export const COLLECTION_FORMATS = { */ export interface RequestArgs { url: string; - options: AxiosRequestConfig; + options: RawAxiosRequestConfig; } /** diff --git a/samples/client/petstore/typescript-axios/tests/default/package-lock.json b/samples/client/petstore/typescript-axios/tests/default/package-lock.json index 24b2819d42bb..eb463a6465d4 100644 --- a/samples/client/petstore/typescript-axios/tests/default/package-lock.json +++ b/samples/client/petstore/typescript-axios/tests/default/package-lock.json @@ -10,16 +10,17 @@ "hasInstallScript": true, "license": "ISC", "dependencies": { - "@openapitools/typescript-axios-petstore": "file:../../builds/with-npm-version", - "chai": "^4.2.0", - "ts-node": "^9.1.1" + "@openapitools/typescript-axios-petstore": "file:../../builds/with-npm-version" }, "devDependencies": { "@types/chai": "^4.2.14", "@types/mocha": "^8.2.0", "@types/node": "^14.14.14", + "axios": "*", "browserify": "^17.0.0", + "chai": "^4.2.0", "mocha": "^8.2.1", + "ts-node": "^9.1.1", "typescript": "^4.1.2" } }, @@ -28,7 +29,7 @@ "version": "1.0.0", "license": "Unlicense", "dependencies": { - "axios": "^0.26.1" + "axios": "^1.6.1" }, "devDependencies": { "@types/node": "^12.11.5", @@ -154,6 +155,7 @@ }, "node_modules/arg": { "version": "4.1.3", + "dev": true, "license": "MIT" }, "node_modules/argparse": { @@ -209,11 +211,18 @@ }, "node_modules/assertion-error": { "version": "1.1.0", + "dev": true, "license": "MIT", "engines": { "node": "*" } }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, "node_modules/available-typed-arrays": { "version": "1.0.2", "dev": true, @@ -228,6 +237,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/axios": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", + "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "node_modules/balanced-match": { "version": "1.0.0", "dev": true, @@ -452,6 +472,7 @@ }, "node_modules/buffer-from": { "version": "1.1.1", + "dev": true, "license": "MIT" }, "node_modules/buffer-xor": { @@ -483,6 +504,7 @@ }, "node_modules/chai": { "version": "4.2.0", + "dev": true, "license": "MIT", "dependencies": { "assertion-error": "^1.1.0", @@ -513,6 +535,7 @@ }, "node_modules/check-error": { "version": "1.0.2", + "dev": true, "license": "MIT", "engines": { "node": "*" @@ -562,6 +585,18 @@ "node": ">=0.10.0" } }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/concat-map": { "version": "0.0.1", "dev": true, @@ -641,6 +676,7 @@ }, "node_modules/create-require": { "version": "1.1.1", + "dev": true, "license": "MIT" }, "node_modules/crypto-browserify": { @@ -695,6 +731,7 @@ }, "node_modules/deep-eql": { "version": "3.0.1", + "dev": true, "license": "MIT", "dependencies": { "type-detect": "^4.0.0" @@ -719,6 +756,15 @@ "dev": true, "license": "MIT" }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/deps-sort": { "version": "2.0.1", "dev": true, @@ -760,6 +806,7 @@ }, "node_modules/diff": { "version": "4.0.2", + "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" @@ -930,11 +977,45 @@ "flat": "cli.js" } }, + "node_modules/follow-redirects": { + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/foreach": { "version": "2.0.5", "dev": true, "license": "MIT" }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "dev": true, @@ -960,6 +1041,7 @@ }, "node_modules/get-func-name": { "version": "2.0.0", + "dev": true, "license": "MIT", "engines": { "node": "*" @@ -1384,6 +1466,7 @@ }, "node_modules/make-error": { "version": "1.3.6", + "dev": true, "license": "ISC" }, "node_modules/md5.js": { @@ -1413,6 +1496,27 @@ "dev": true, "license": "MIT" }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/minimalistic-assert": { "version": "1.0.1", "dev": true, @@ -1964,6 +2068,7 @@ }, "node_modules/pathval": { "version": "1.1.0", + "dev": true, "license": "MIT", "engines": { "node": "*" @@ -2008,6 +2113,12 @@ "dev": true, "license": "MIT" }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, "node_modules/public-encrypt": { "version": "4.0.3", "dev": true, @@ -2214,6 +2325,7 @@ }, "node_modules/source-map": { "version": "0.6.1", + "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -2221,6 +2333,7 @@ }, "node_modules/source-map-support": { "version": "0.5.19", + "dev": true, "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", @@ -2423,6 +2536,7 @@ }, "node_modules/ts-node": { "version": "9.1.1", + "dev": true, "license": "MIT", "dependencies": { "arg": "^4.1.0", @@ -2452,6 +2566,7 @@ }, "node_modules/type-detect": { "version": "4.0.8", + "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -2464,6 +2579,7 @@ }, "node_modules/typescript": { "version": "4.1.3", + "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -2721,6 +2837,7 @@ }, "node_modules/yn": { "version": "3.1.1", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -2743,7 +2860,7 @@ "version": "file:../../builds/with-npm-version", "requires": { "@types/node": "^12.11.5", - "axios": "^0.26.1", + "axios": "^1.6.1", "typescript": "^4.0" }, "dependencies": { @@ -2811,7 +2928,8 @@ } }, "arg": { - "version": "4.1.3" + "version": "4.1.3", + "dev": true }, "argparse": { "version": "1.0.10", @@ -2862,7 +2980,14 @@ } }, "assertion-error": { - "version": "1.1.0" + "version": "1.1.0", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true }, "available-typed-arrays": { "version": "1.0.2", @@ -2871,6 +2996,17 @@ "array-filter": "^1.0.0" } }, + "axios": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", + "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", + "dev": true, + "requires": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "balanced-match": { "version": "1.0.0", "dev": true @@ -3053,7 +3189,8 @@ } }, "buffer-from": { - "version": "1.1.1" + "version": "1.1.1", + "dev": true }, "buffer-xor": { "version": "1.0.3", @@ -3077,6 +3214,7 @@ }, "chai": { "version": "4.2.0", + "dev": true, "requires": { "assertion-error": "^1.1.0", "check-error": "^1.0.2", @@ -3095,7 +3233,8 @@ } }, "check-error": { - "version": "1.0.2" + "version": "1.0.2", + "dev": true }, "cipher-base": { "version": "1.0.4", @@ -3132,6 +3271,15 @@ } } }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, "concat-map": { "version": "0.0.1", "dev": true @@ -3200,7 +3348,8 @@ } }, "create-require": { - "version": "1.1.1" + "version": "1.1.1", + "dev": true }, "crypto-browserify": { "version": "3.12.0", @@ -3236,6 +3385,7 @@ }, "deep-eql": { "version": "3.0.1", + "dev": true, "requires": { "type-detect": "^4.0.0" } @@ -3251,6 +3401,12 @@ "version": "1.0.0", "dev": true }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true + }, "deps-sort": { "version": "2.0.1", "dev": true, @@ -3279,7 +3435,8 @@ } }, "diff": { - "version": "4.0.2" + "version": "4.0.2", + "dev": true }, "diffie-hellman": { "version": "5.0.3", @@ -3393,10 +3550,27 @@ "version": "5.0.2", "dev": true }, + "follow-redirects": { + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "dev": true + }, "foreach": { "version": "2.0.5", "dev": true }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, "fs.realpath": { "version": "1.0.0", "dev": true @@ -3414,7 +3588,8 @@ "dev": true }, "get-func-name": { - "version": "2.0.0" + "version": "2.0.0", + "dev": true }, "get-intrinsic": { "version": "1.0.1", @@ -3668,7 +3843,8 @@ } }, "make-error": { - "version": "1.3.6" + "version": "1.3.6", + "dev": true }, "md5.js": { "version": "1.3.5", @@ -3693,6 +3869,21 @@ } } }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "requires": { + "mime-db": "1.52.0" + } + }, "minimalistic-assert": { "version": "1.0.1", "dev": true @@ -4051,7 +4242,8 @@ "dev": true }, "pathval": { - "version": "1.1.0" + "version": "1.1.0", + "dev": true }, "pbkdf2": { "version": "3.1.1", @@ -4076,6 +4268,12 @@ "version": "2.0.1", "dev": true }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, "public-encrypt": { "version": "4.0.3", "dev": true, @@ -4221,10 +4419,12 @@ "dev": true }, "source-map": { - "version": "0.6.1" + "version": "0.6.1", + "dev": true }, "source-map-support": { "version": "0.5.19", + "dev": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -4380,6 +4580,7 @@ }, "ts-node": { "version": "9.1.1", + "dev": true, "requires": { "arg": "^4.1.0", "create-require": "^1.1.0", @@ -4394,14 +4595,16 @@ "dev": true }, "type-detect": { - "version": "4.0.8" + "version": "4.0.8", + "dev": true }, "typedarray": { "version": "0.0.6", "dev": true }, "typescript": { - "version": "4.1.3" + "version": "4.1.3", + "dev": true }, "umd": { "version": "3.0.3", @@ -4580,7 +4783,8 @@ } }, "yn": { - "version": "3.1.1" + "version": "3.1.1", + "dev": true }, "yocto-queue": { "version": "0.1.0", diff --git a/samples/client/petstore/typescript-axios/tests/default/package.json b/samples/client/petstore/typescript-axios/tests/default/package.json index c723eabd6f38..88bc110e0270 100644 --- a/samples/client/petstore/typescript-axios/tests/default/package.json +++ b/samples/client/petstore/typescript-axios/tests/default/package.json @@ -1,12 +1,10 @@ { "private": true, "dependencies": { - "@openapitools/typescript-axios-petstore": "file:../../builds/with-npm-version", - "chai": "^4.2.0", - "ts-node": "^9.1.1" + "@openapitools/typescript-axios-petstore": "file:../../builds/with-npm-version" }, "scripts": { - "preinstall": "npm install ../../builds/with-npm-version && npm run build", + "preinstall": "npm --prefix ../../builds/with-npm-version install && npm run build", "test": "mocha test/*.ts --require ts-node/register --timeout 10000", "build": "tsc", "browserify": "browserify test -p [ tsify ] > ./dist/test.browserify-bundle.js" @@ -15,8 +13,11 @@ "@types/chai": "^4.2.14", "@types/mocha": "^8.2.0", "@types/node": "^14.14.14", + "axios": "*", "browserify": "^17.0.0", + "chai": "^4.2.0", "mocha": "^8.2.1", + "ts-node": "^9.1.1", "typescript": "^4.1.2" }, "name": "typescript-axios-test", diff --git a/samples/client/petstore/typescript-axios/tests/default/test/PetApi.ts b/samples/client/petstore/typescript-axios/tests/default/test/PetApi.ts index f052c4c47fb7..dabb4d9a4f4f 100644 --- a/samples/client/petstore/typescript-axios/tests/default/test/PetApi.ts +++ b/samples/client/petstore/typescript-axios/tests/default/test/PetApi.ts @@ -1,6 +1,6 @@ import { expect } from "chai"; import { PetApi, Pet, PetStatusEnum, Category } from "@openapitools/typescript-axios-petstore"; -import axios, {AxiosInstance, AxiosResponse} from "@openapitools/typescript-axios-petstore/node_modules/axios"; +import axios, {AxiosInstance, AxiosResponse} from "axios"; describe("PetApi", () => { function runSuite(description: string, requestOptions?: any, customAxiosInstance?: AxiosInstance): void { diff --git a/samples/client/petstore/typescript-axios/tests/default/test/PetApiFactory.ts b/samples/client/petstore/typescript-axios/tests/default/test/PetApiFactory.ts index e51c3270e4c4..b4d602e28ce4 100644 --- a/samples/client/petstore/typescript-axios/tests/default/test/PetApiFactory.ts +++ b/samples/client/petstore/typescript-axios/tests/default/test/PetApiFactory.ts @@ -6,7 +6,7 @@ import { Category } from "@openapitools/typescript-axios-petstore"; import { Configuration } from "@openapitools/typescript-axios-petstore"; -import axios, {AxiosInstance, AxiosResponse} from "@openapitools/typescript-axios-petstore/node_modules/axios"; +import axios, {AxiosInstance, AxiosResponse} from "axios"; let config: Configuration; diff --git a/samples/client/petstore/typescript-axios/tests/default/test/StoreApi.ts b/samples/client/petstore/typescript-axios/tests/default/test/StoreApi.ts index 1aa120ca6e85..35137340fcab 100644 --- a/samples/client/petstore/typescript-axios/tests/default/test/StoreApi.ts +++ b/samples/client/petstore/typescript-axios/tests/default/test/StoreApi.ts @@ -1,6 +1,6 @@ import { expect } from "chai"; import { StoreApi } from "@openapitools/typescript-axios-petstore"; -import axios, {AxiosInstance, AxiosResponse} from "@openapitools/typescript-axios-petstore/node_modules/axios"; +import axios, {AxiosInstance, AxiosResponse} from "axios"; describe("StoreApi", function() { function runSuite(description: string, requestOptions?: any, customAxiosInstance?: AxiosInstance): void { diff --git a/samples/client/petstore/typescript-axios/tests/default/test/StoreApiFactory.ts b/samples/client/petstore/typescript-axios/tests/default/test/StoreApiFactory.ts index da87526f4e29..17e8f6766c9c 100644 --- a/samples/client/petstore/typescript-axios/tests/default/test/StoreApiFactory.ts +++ b/samples/client/petstore/typescript-axios/tests/default/test/StoreApiFactory.ts @@ -1,7 +1,7 @@ import { expect } from "chai"; import { StoreApiFactory } from "@openapitools/typescript-axios-petstore"; import { Configuration } from "@openapitools/typescript-axios-petstore"; -import axios, {AxiosInstance, AxiosResponse} from "@openapitools/typescript-axios-petstore/node_modules/axios"; +import axios, {AxiosInstance, AxiosResponse} from "axios"; let config: Configuration;