forked from loafle/openapi-generator-original
[typescript-axios] Fix model property naming (#10447)
* fix: typescript-axios property names Disables MODEL_PROPERTY_NAMING for typescript-axios generator as this was never supported (templates have no mapping between original property names and formatted names). Wraps all properties in model interfaces with '' to support most characters except ' for now. Also fixes missing options typing that was any before. * chore: add new sample, generate samples * chore: update generator docs
This commit is contained in:
parent
bcf12b36e6
commit
755359c031
4
bin/configs/typescript-axios-test-petstore.yaml
Normal file
4
bin/configs/typescript-axios-test-petstore.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
generatorName: typescript-axios
|
||||
outputDir: samples/client/petstore/typescript-axios/builds/test-petstore
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-axios
|
@ -13,7 +13,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|
|
||||
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original|
|
||||
|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null|
|
||||
|npmRepository|Use this property to set an url of your private npmRepo in the package.json| |null|
|
||||
|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0|
|
||||
|
@ -55,6 +55,8 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege
|
||||
this.cliOptions.add(new CliOption(SEPARATE_MODELS_AND_API, "Put the model and api in separate folders and in separate classes", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
|
||||
this.cliOptions.add(new CliOption(WITHOUT_PREFIX_ENUMS, "Don't prefix enum names with class names", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
|
||||
this.cliOptions.add(new CliOption(USE_SINGLE_REQUEST_PARAMETER, "Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
|
||||
// Templates have no mapping between formatted property names and original base names so use only "original" and remove this option
|
||||
removeOption(CodegenConstants.MODEL_PROPERTY_NAMING);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
{{^withSeparateModelsAndApi}}
|
||||
import { Configuration } from './configuration';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
||||
|
@ -3,7 +3,7 @@
|
||||
/* eslint-disable */
|
||||
{{>licenseInfo}}
|
||||
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
import { Configuration } from '{{apiRelativeToRoot}}configuration';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
@ -38,7 +38,7 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
|
||||
* @deprecated{{/isDeprecated}}
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
{{nickname}}: async ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options: any = {}): Promise<RequestArgs> => {
|
||||
{{nickname}}: async ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
{{#allParams}}
|
||||
{{#required}}
|
||||
// verify required parameter '{{paramName}}' is not null or undefined
|
||||
@ -222,7 +222,7 @@ export const {{classname}}Fp = function(configuration?: Configuration) {
|
||||
* @deprecated{{/isDeprecated}}
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>> {
|
||||
async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -280,7 +280,7 @@ export interface {{classname}}Interface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof {{classname}}Interface
|
||||
*/
|
||||
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>;
|
||||
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: AxiosRequestConfig): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>;
|
||||
|
||||
{{/operation}}
|
||||
}
|
||||
@ -346,12 +346,12 @@ export class {{classname}} extends BaseAPI {
|
||||
* @memberof {{classname}}
|
||||
*/
|
||||
{{#useSingleRequestParameter}}
|
||||
public {{nickname}}({{#allParams.0}}requestParameters: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, {{/allParams.0}}options?: any) {
|
||||
public {{nickname}}({{#allParams.0}}requestParameters: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, {{/allParams.0}}options?: AxiosRequestConfig) {
|
||||
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}}: {{{dataType}}}, {{/allParams}}options?: any) {
|
||||
public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: AxiosRequestConfig) {
|
||||
return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
{{/useSingleRequestParameter}}
|
||||
|
@ -5,7 +5,7 @@
|
||||
import { Configuration } from "./configuration";
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
|
||||
export const BASE_PATH = "{{{basePath}}}".replace(/\/+$/, "");
|
||||
|
||||
@ -27,7 +27,7 @@ export const COLLECTION_FORMATS = {
|
||||
*/
|
||||
export interface RequestArgs {
|
||||
url: string;
|
||||
options: any;
|
||||
options: AxiosRequestConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@ export interface {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{
|
||||
* @deprecated
|
||||
{{/deprecated}}
|
||||
*/
|
||||
{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}};
|
||||
'{{baseName}}'{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}};
|
||||
{{/vars}}
|
||||
}{{#hasEnums}}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
|
||||
import { Configuration } from './configuration';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
||||
@ -32,13 +32,13 @@ export interface Cat {
|
||||
* @type {boolean}
|
||||
* @memberof Cat
|
||||
*/
|
||||
hunts?: boolean;
|
||||
'hunts'?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Cat
|
||||
*/
|
||||
age?: number;
|
||||
'age'?: number;
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -51,13 +51,13 @@ export interface CatAllOf {
|
||||
* @type {boolean}
|
||||
* @memberof CatAllOf
|
||||
*/
|
||||
hunts?: boolean;
|
||||
'hunts'?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CatAllOf
|
||||
*/
|
||||
age?: number;
|
||||
'age'?: number;
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -70,13 +70,13 @@ export interface Dog {
|
||||
* @type {boolean}
|
||||
* @memberof Dog
|
||||
*/
|
||||
bark?: boolean;
|
||||
'bark'?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Dog
|
||||
*/
|
||||
breed?: DogBreedEnum;
|
||||
'breed'?: DogBreedEnum;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -101,13 +101,13 @@ export interface DogAllOf {
|
||||
* @type {boolean}
|
||||
* @memberof DogAllOf
|
||||
*/
|
||||
bark?: boolean;
|
||||
'bark'?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DogAllOf
|
||||
*/
|
||||
breed?: DogAllOfBreedEnum;
|
||||
'breed'?: DogAllOfBreedEnum;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -132,7 +132,7 @@ export interface InlineObject {
|
||||
* @type {any}
|
||||
* @memberof InlineObject
|
||||
*/
|
||||
file?: any;
|
||||
'file'?: any;
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -145,13 +145,13 @@ export interface PetByAge {
|
||||
* @type {number}
|
||||
* @memberof PetByAge
|
||||
*/
|
||||
age: number;
|
||||
'age': number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PetByAge
|
||||
*/
|
||||
nickname?: string;
|
||||
'nickname'?: string;
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -164,13 +164,13 @@ export interface PetByType {
|
||||
* @type {string}
|
||||
* @memberof PetByType
|
||||
*/
|
||||
pet_type: PetByTypePetTypeEnum;
|
||||
'pet_type': PetByTypePetTypeEnum;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PetByType
|
||||
*/
|
||||
hunts?: boolean;
|
||||
'hunts'?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -195,7 +195,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
filePost: async (inlineObject?: InlineObject, options: any = {}): Promise<RequestArgs> => {
|
||||
filePost: async (inlineObject?: InlineObject, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/file`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
@ -228,7 +228,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
petsFilteredPatch: async (petByAgePetByType?: PetByAge | PetByType, options: any = {}): Promise<RequestArgs> => {
|
||||
petsFilteredPatch: async (petByAgePetByType?: PetByAge | PetByType, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
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);
|
||||
@ -261,7 +261,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
petsPatch: async (catDog?: Cat | Dog, options: any = {}): Promise<RequestArgs> => {
|
||||
petsPatch: async (catDog?: Cat | Dog, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/pets`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
@ -304,7 +304,7 @@ export const DefaultApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async filePost(inlineObject?: InlineObject, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async filePost(inlineObject?: InlineObject, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.filePost(inlineObject, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -314,7 +314,7 @@ export const DefaultApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async petsFilteredPatch(petByAgePetByType?: PetByAge | PetByType, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async petsFilteredPatch(petByAgePetByType?: PetByAge | PetByType, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.petsFilteredPatch(petByAgePetByType, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -324,7 +324,7 @@ export const DefaultApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async petsPatch(catDog?: Cat | Dog, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async petsPatch(catDog?: Cat | Dog, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.petsPatch(catDog, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -382,7 +382,7 @@ export class DefaultApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof DefaultApi
|
||||
*/
|
||||
public filePost(inlineObject?: InlineObject, options?: any) {
|
||||
public filePost(inlineObject?: InlineObject, options?: AxiosRequestConfig) {
|
||||
return DefaultApiFp(this.configuration).filePost(inlineObject, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -393,7 +393,7 @@ export class DefaultApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof DefaultApi
|
||||
*/
|
||||
public petsFilteredPatch(petByAgePetByType?: PetByAge | PetByType, options?: any) {
|
||||
public petsFilteredPatch(petByAgePetByType?: PetByAge | PetByType, options?: AxiosRequestConfig) {
|
||||
return DefaultApiFp(this.configuration).petsFilteredPatch(petByAgePetByType, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -404,7 +404,7 @@ export class DefaultApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof DefaultApi
|
||||
*/
|
||||
public petsPatch(catDog?: Cat | Dog, options?: any) {
|
||||
public petsPatch(catDog?: Cat | Dog, options?: AxiosRequestConfig) {
|
||||
return DefaultApiFp(this.configuration).petsPatch(catDog, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
import { Configuration } from "./configuration";
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
|
||||
export const BASE_PATH = "http://api.example.xyz/v1".replace(/\/+$/, "");
|
||||
|
||||
@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = {
|
||||
*/
|
||||
export interface RequestArgs {
|
||||
url: string;
|
||||
options: any;
|
||||
options: AxiosRequestConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
|
||||
import { Configuration } from './configuration';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
||||
@ -32,19 +32,19 @@ export interface ApiResponse {
|
||||
* @type {number}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
code?: number;
|
||||
'code'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
type?: string;
|
||||
'type'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
message?: string;
|
||||
'message'?: string;
|
||||
}
|
||||
/**
|
||||
* A category for a pet
|
||||
@ -57,13 +57,13 @@ export interface Category {
|
||||
* @type {number}
|
||||
* @memberof Category
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Category
|
||||
*/
|
||||
name?: string;
|
||||
'name'?: string;
|
||||
}
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
@ -76,37 +76,37 @@ export interface Order {
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
petId?: number;
|
||||
'petId'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
quantity?: number;
|
||||
'quantity'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Order
|
||||
*/
|
||||
shipDate?: string;
|
||||
'shipDate'?: string;
|
||||
/**
|
||||
* Order Status
|
||||
* @type {string}
|
||||
* @memberof Order
|
||||
*/
|
||||
status?: OrderStatusEnum;
|
||||
'status'?: OrderStatusEnum;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof Order
|
||||
*/
|
||||
complete?: boolean;
|
||||
'complete'?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -130,37 +130,37 @@ export interface Pet {
|
||||
* @type {number}
|
||||
* @memberof Pet
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Category}
|
||||
* @memberof Pet
|
||||
*/
|
||||
category?: Category;
|
||||
'category'?: Category;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Pet
|
||||
*/
|
||||
name: string;
|
||||
'name': string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof Pet
|
||||
*/
|
||||
photoUrls: Array<string>;
|
||||
'photoUrls': Array<string>;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Tag>}
|
||||
* @memberof Pet
|
||||
*/
|
||||
tags?: Array<Tag>;
|
||||
'tags'?: Array<Tag>;
|
||||
/**
|
||||
* pet status in the store
|
||||
* @type {string}
|
||||
* @memberof Pet
|
||||
*/
|
||||
status?: PetStatusEnum;
|
||||
'status'?: PetStatusEnum;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -184,13 +184,13 @@ export interface Tag {
|
||||
* @type {number}
|
||||
* @memberof Tag
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Tag
|
||||
*/
|
||||
name?: string;
|
||||
'name'?: string;
|
||||
}
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
@ -203,49 +203,49 @@ export interface User {
|
||||
* @type {number}
|
||||
* @memberof User
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
username?: string;
|
||||
'username'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
firstName?: string;
|
||||
'firstName'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
lastName?: string;
|
||||
'lastName'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
email?: string;
|
||||
'email'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
password?: string;
|
||||
'password'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
phone?: string;
|
||||
'phone'?: string;
|
||||
/**
|
||||
* User Status
|
||||
* @type {number}
|
||||
* @memberof User
|
||||
*/
|
||||
userStatus?: number;
|
||||
'userStatus'?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -261,7 +261,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('addPet', 'body', body)
|
||||
const localVarPath = `/pet`;
|
||||
@ -302,7 +302,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('deletePet', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -344,7 +344,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise<RequestArgs> => {
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'status' is not null or undefined
|
||||
assertParamExists('findPetsByStatus', 'status', status)
|
||||
const localVarPath = `/pet/findByStatus`;
|
||||
@ -386,7 +386,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
|
||||
findPetsByTags: async (tags: Array<string>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'tags' is not null or undefined
|
||||
assertParamExists('findPetsByTags', 'tags', tags)
|
||||
const localVarPath = `/pet/findByTags`;
|
||||
@ -427,7 +427,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById: async (petId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('getPetById', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -464,7 +464,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('updatePet', 'body', body)
|
||||
const localVarPath = `/pet`;
|
||||
@ -506,7 +506,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('updatePetWithForm', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -558,7 +558,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise<RequestArgs> => {
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('uploadFile', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}/uploadImage`
|
||||
@ -618,7 +618,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async addPet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -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?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -641,7 +641,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -653,7 +653,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
async findPetsByTags(tags: Array<string>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -664,7 +664,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -675,7 +675,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatePet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -688,7 +688,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -701,7 +701,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -819,7 +819,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public addPet(body: Pet, options?: any) {
|
||||
public addPet(body: Pet, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -832,7 +832,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public deletePet(petId: number, apiKey?: string, options?: any) {
|
||||
public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -844,7 +844,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -857,7 +857,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByTags(tags: Array<string>, options?: any) {
|
||||
public findPetsByTags(tags: Array<string>, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -869,7 +869,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public getPetById(petId: number, options?: any) {
|
||||
public getPetById(petId: number, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -881,7 +881,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePet(body: Pet, options?: any) {
|
||||
public updatePet(body: Pet, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -895,7 +895,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -909,7 +909,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
@ -928,7 +928,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder: async (orderId: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
assertParamExists('deleteOrder', 'orderId', orderId)
|
||||
const localVarPath = `/store/order/{orderId}`
|
||||
@ -961,7 +961,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory: async (options: any = {}): Promise<RequestArgs> => {
|
||||
getInventory: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
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);
|
||||
@ -995,7 +995,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById: async (orderId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
assertParamExists('getOrderById', 'orderId', orderId)
|
||||
const localVarPath = `/store/order/{orderId}`
|
||||
@ -1029,7 +1029,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder: async (body: Order, options: any = {}): Promise<RequestArgs> => {
|
||||
placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('placeOrder', 'body', body)
|
||||
const localVarPath = `/store/order`;
|
||||
@ -1075,7 +1075,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1085,7 +1085,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1096,7 +1096,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1107,7 +1107,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async placeOrder(body: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1178,7 +1178,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public deleteOrder(orderId: string, options?: any) {
|
||||
public deleteOrder(orderId: string, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1189,7 +1189,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getInventory(options?: any) {
|
||||
public getInventory(options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1201,7 +1201,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getOrderById(orderId: number, options?: any) {
|
||||
public getOrderById(orderId: number, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1213,7 +1213,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public placeOrder(body: Order, options?: any) {
|
||||
public placeOrder(body: Order, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
@ -1232,7 +1232,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser: async (body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
createUser: async (body: User, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('createUser', 'body', body)
|
||||
const localVarPath = `/user`;
|
||||
@ -1268,7 +1268,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
createUsersWithArrayInput: async (body: Array<User>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('createUsersWithArrayInput', 'body', body)
|
||||
const localVarPath = `/user/createWithArray`;
|
||||
@ -1304,7 +1304,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
createUsersWithListInput: async (body: Array<User>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('createUsersWithListInput', 'body', body)
|
||||
const localVarPath = `/user/createWithList`;
|
||||
@ -1340,7 +1340,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('deleteUser', 'username', username)
|
||||
const localVarPath = `/user/{username}`
|
||||
@ -1374,7 +1374,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('getUserByName', 'username', username)
|
||||
const localVarPath = `/user/{username}`
|
||||
@ -1409,7 +1409,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser: async (username: string, password: string, options: any = {}): Promise<RequestArgs> => {
|
||||
loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('loginUser', 'username', username)
|
||||
// verify required parameter 'password' is not null or undefined
|
||||
@ -1451,7 +1451,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser: async (options: any = {}): Promise<RequestArgs> => {
|
||||
logoutUser: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
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);
|
||||
@ -1483,7 +1483,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser: async (username: string, body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('updateUser', 'username', username)
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
@ -1532,7 +1532,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUser(body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1543,7 +1543,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUsersWithArrayInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUsersWithArrayInput(body: Array<User>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1554,7 +1554,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUsersWithListInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUsersWithListInput(body: Array<User>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1565,7 +1565,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1576,7 +1576,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1588,7 +1588,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1598,7 +1598,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1610,7 +1610,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updateUser(username: string, body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1723,7 +1723,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUser(body: User, options?: any) {
|
||||
public createUser(body: User, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1735,7 +1735,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithArrayInput(body: Array<User>, options?: any) {
|
||||
public createUsersWithArrayInput(body: Array<User>, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1747,7 +1747,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithListInput(body: Array<User>, options?: any) {
|
||||
public createUsersWithListInput(body: Array<User>, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1759,7 +1759,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public deleteUser(username: string, options?: any) {
|
||||
public deleteUser(username: string, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1771,7 +1771,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public getUserByName(username: string, options?: any) {
|
||||
public getUserByName(username: string, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1784,7 +1784,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public loginUser(username: string, password: string, options?: any) {
|
||||
public loginUser(username: string, password: string, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1795,7 +1795,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public logoutUser(options?: any) {
|
||||
public logoutUser(options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1808,7 +1808,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public updateUser(username: string, body: User, options?: any) {
|
||||
public updateUser(username: string, body: User, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
import { Configuration } from "./configuration";
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
|
||||
export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
|
||||
|
||||
@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = {
|
||||
*/
|
||||
export interface RequestArgs {
|
||||
url: string;
|
||||
options: any;
|
||||
options: AxiosRequestConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
|
||||
import { Configuration } from './configuration';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
||||
@ -32,19 +32,19 @@ export interface ApiResponse {
|
||||
* @type {number}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
code?: number;
|
||||
'code'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
type?: string;
|
||||
'type'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
message?: string;
|
||||
'message'?: string;
|
||||
}
|
||||
/**
|
||||
* A category for a pet
|
||||
@ -57,13 +57,13 @@ export interface Category {
|
||||
* @type {number}
|
||||
* @memberof Category
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Category
|
||||
*/
|
||||
name?: string;
|
||||
'name'?: string;
|
||||
}
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
@ -76,37 +76,37 @@ export interface Order {
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
petId?: number;
|
||||
'petId'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
quantity?: number;
|
||||
'quantity'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Order
|
||||
*/
|
||||
shipDate?: string;
|
||||
'shipDate'?: string;
|
||||
/**
|
||||
* Order Status
|
||||
* @type {string}
|
||||
* @memberof Order
|
||||
*/
|
||||
status?: OrderStatusEnum;
|
||||
'status'?: OrderStatusEnum;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof Order
|
||||
*/
|
||||
complete?: boolean;
|
||||
'complete'?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -130,37 +130,37 @@ export interface Pet {
|
||||
* @type {number}
|
||||
* @memberof Pet
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Category}
|
||||
* @memberof Pet
|
||||
*/
|
||||
category?: Category;
|
||||
'category'?: Category;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Pet
|
||||
*/
|
||||
name: string;
|
||||
'name': string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof Pet
|
||||
*/
|
||||
photoUrls: Array<string>;
|
||||
'photoUrls': Array<string>;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Tag>}
|
||||
* @memberof Pet
|
||||
*/
|
||||
tags?: Array<Tag>;
|
||||
'tags'?: Array<Tag>;
|
||||
/**
|
||||
* pet status in the store
|
||||
* @type {string}
|
||||
* @memberof Pet
|
||||
*/
|
||||
status?: PetStatusEnum;
|
||||
'status'?: PetStatusEnum;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -184,13 +184,13 @@ export interface Tag {
|
||||
* @type {number}
|
||||
* @memberof Tag
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Tag
|
||||
*/
|
||||
name?: string;
|
||||
'name'?: string;
|
||||
}
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
@ -203,49 +203,49 @@ export interface User {
|
||||
* @type {number}
|
||||
* @memberof User
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
username?: string;
|
||||
'username'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
firstName?: string;
|
||||
'firstName'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
lastName?: string;
|
||||
'lastName'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
email?: string;
|
||||
'email'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
password?: string;
|
||||
'password'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
phone?: string;
|
||||
'phone'?: string;
|
||||
/**
|
||||
* User Status
|
||||
* @type {number}
|
||||
* @memberof User
|
||||
*/
|
||||
userStatus?: number;
|
||||
'userStatus'?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -261,7 +261,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('addPet', 'body', body)
|
||||
const localVarPath = `/pet`;
|
||||
@ -302,7 +302,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('deletePet', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -344,7 +344,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise<RequestArgs> => {
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'status' is not null or undefined
|
||||
assertParamExists('findPetsByStatus', 'status', status)
|
||||
const localVarPath = `/pet/findByStatus`;
|
||||
@ -386,7 +386,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
|
||||
findPetsByTags: async (tags: Array<string>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'tags' is not null or undefined
|
||||
assertParamExists('findPetsByTags', 'tags', tags)
|
||||
const localVarPath = `/pet/findByTags`;
|
||||
@ -427,7 +427,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById: async (petId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('getPetById', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -464,7 +464,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('updatePet', 'body', body)
|
||||
const localVarPath = `/pet`;
|
||||
@ -506,7 +506,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('updatePetWithForm', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -558,7 +558,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise<RequestArgs> => {
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('uploadFile', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}/uploadImage`
|
||||
@ -618,7 +618,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async addPet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -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?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -641,7 +641,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -653,7 +653,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
async findPetsByTags(tags: Array<string>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -664,7 +664,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -675,7 +675,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatePet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -688,7 +688,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -701,7 +701,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -819,7 +819,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public addPet(body: Pet, options?: any) {
|
||||
public addPet(body: Pet, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -832,7 +832,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public deletePet(petId: number, apiKey?: string, options?: any) {
|
||||
public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -844,7 +844,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -857,7 +857,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByTags(tags: Array<string>, options?: any) {
|
||||
public findPetsByTags(tags: Array<string>, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -869,7 +869,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public getPetById(petId: number, options?: any) {
|
||||
public getPetById(petId: number, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -881,7 +881,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePet(body: Pet, options?: any) {
|
||||
public updatePet(body: Pet, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -895,7 +895,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -909,7 +909,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
@ -928,7 +928,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder: async (orderId: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
assertParamExists('deleteOrder', 'orderId', orderId)
|
||||
const localVarPath = `/store/order/{orderId}`
|
||||
@ -961,7 +961,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory: async (options: any = {}): Promise<RequestArgs> => {
|
||||
getInventory: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
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);
|
||||
@ -995,7 +995,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById: async (orderId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
assertParamExists('getOrderById', 'orderId', orderId)
|
||||
const localVarPath = `/store/order/{orderId}`
|
||||
@ -1029,7 +1029,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder: async (body: Order, options: any = {}): Promise<RequestArgs> => {
|
||||
placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('placeOrder', 'body', body)
|
||||
const localVarPath = `/store/order`;
|
||||
@ -1075,7 +1075,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1085,7 +1085,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1096,7 +1096,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1107,7 +1107,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async placeOrder(body: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1178,7 +1178,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public deleteOrder(orderId: string, options?: any) {
|
||||
public deleteOrder(orderId: string, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1189,7 +1189,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getInventory(options?: any) {
|
||||
public getInventory(options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1201,7 +1201,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getOrderById(orderId: number, options?: any) {
|
||||
public getOrderById(orderId: number, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1213,7 +1213,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public placeOrder(body: Order, options?: any) {
|
||||
public placeOrder(body: Order, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
@ -1232,7 +1232,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser: async (body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
createUser: async (body: User, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('createUser', 'body', body)
|
||||
const localVarPath = `/user`;
|
||||
@ -1268,7 +1268,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
createUsersWithArrayInput: async (body: Array<User>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('createUsersWithArrayInput', 'body', body)
|
||||
const localVarPath = `/user/createWithArray`;
|
||||
@ -1304,7 +1304,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
createUsersWithListInput: async (body: Array<User>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('createUsersWithListInput', 'body', body)
|
||||
const localVarPath = `/user/createWithList`;
|
||||
@ -1340,7 +1340,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('deleteUser', 'username', username)
|
||||
const localVarPath = `/user/{username}`
|
||||
@ -1374,7 +1374,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('getUserByName', 'username', username)
|
||||
const localVarPath = `/user/{username}`
|
||||
@ -1409,7 +1409,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser: async (username: string, password: string, options: any = {}): Promise<RequestArgs> => {
|
||||
loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('loginUser', 'username', username)
|
||||
// verify required parameter 'password' is not null or undefined
|
||||
@ -1451,7 +1451,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser: async (options: any = {}): Promise<RequestArgs> => {
|
||||
logoutUser: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
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);
|
||||
@ -1483,7 +1483,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser: async (username: string, body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('updateUser', 'username', username)
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
@ -1532,7 +1532,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUser(body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1543,7 +1543,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUsersWithArrayInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUsersWithArrayInput(body: Array<User>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1554,7 +1554,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUsersWithListInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUsersWithListInput(body: Array<User>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1565,7 +1565,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1576,7 +1576,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1588,7 +1588,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1598,7 +1598,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1610,7 +1610,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updateUser(username: string, body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1723,7 +1723,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUser(body: User, options?: any) {
|
||||
public createUser(body: User, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1735,7 +1735,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithArrayInput(body: Array<User>, options?: any) {
|
||||
public createUsersWithArrayInput(body: Array<User>, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1747,7 +1747,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithListInput(body: Array<User>, options?: any) {
|
||||
public createUsersWithListInput(body: Array<User>, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1759,7 +1759,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public deleteUser(username: string, options?: any) {
|
||||
public deleteUser(username: string, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1771,7 +1771,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public getUserByName(username: string, options?: any) {
|
||||
public getUserByName(username: string, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1784,7 +1784,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public loginUser(username: string, password: string, options?: any) {
|
||||
public loginUser(username: string, password: string, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1795,7 +1795,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public logoutUser(options?: any) {
|
||||
public logoutUser(options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1808,7 +1808,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public updateUser(username: string, body: User, options?: any) {
|
||||
public updateUser(username: string, body: User, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
import { Configuration } from "./configuration";
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
|
||||
export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
|
||||
|
||||
@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = {
|
||||
*/
|
||||
export interface RequestArgs {
|
||||
url: string;
|
||||
options: any;
|
||||
options: AxiosRequestConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
|
4
samples/client/petstore/typescript-axios/builds/test-petstore/.gitignore
vendored
Normal file
4
samples/client/petstore/typescript-axios/builds/test-petstore/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
wwwroot/*.js
|
||||
node_modules
|
||||
typings
|
||||
dist
|
@ -0,0 +1 @@
|
||||
# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm
|
@ -0,0 +1,23 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
@ -0,0 +1,8 @@
|
||||
.gitignore
|
||||
.npmignore
|
||||
api.ts
|
||||
base.ts
|
||||
common.ts
|
||||
configuration.ts
|
||||
git_push.sh
|
||||
index.ts
|
@ -0,0 +1 @@
|
||||
5.3.0-SNAPSHOT
|
5035
samples/client/petstore/typescript-axios/builds/test-petstore/api.ts
Normal file
5035
samples/client/petstore/typescript-axios/builds/test-petstore/api.ts
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,71 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import { Configuration } from "./configuration";
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
|
||||
export const BASE_PATH = "http://petstore.swagger.io:80/v2".replace(/\/+$/, "");
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const COLLECTION_FORMATS = {
|
||||
csv: ",",
|
||||
ssv: " ",
|
||||
tsv: "\t",
|
||||
pipes: "|",
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface RequestArgs
|
||||
*/
|
||||
export interface RequestArgs {
|
||||
url: string;
|
||||
options: AxiosRequestConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class BaseAPI
|
||||
*/
|
||||
export class BaseAPI {
|
||||
protected configuration: Configuration | undefined;
|
||||
|
||||
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class RequiredError
|
||||
* @extends {Error}
|
||||
*/
|
||||
export class RequiredError extends Error {
|
||||
name: "RequiredError" = "RequiredError";
|
||||
constructor(public field: string, msg?: string) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
@ -0,0 +1,138 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import { Configuration } from "./configuration";
|
||||
import { RequiredError, RequestArgs } from "./base";
|
||||
import { AxiosInstance } from 'axios';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const DUMMY_BASE_URL = 'https://example.com'
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws {RequiredError}
|
||||
* @export
|
||||
*/
|
||||
export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
|
||||
if (paramValue === null || paramValue === undefined) {
|
||||
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||
? await configuration.apiKey(keyParamName)
|
||||
: await configuration.apiKey;
|
||||
object[keyParamName] = localVarApiKeyValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
|
||||
if (configuration && (configuration.username || configuration.password)) {
|
||||
object["auth"] = { username: configuration.username, password: configuration.password };
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
object["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
|
||||
if (configuration && configuration.accessToken) {
|
||||
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken(name, scopes)
|
||||
: await configuration.accessToken;
|
||||
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const setSearchParams = function (url: URL, ...objects: any[]) {
|
||||
const searchParams = new URLSearchParams(url.search);
|
||||
for (const object of objects) {
|
||||
for (const key in object) {
|
||||
if (Array.isArray(object[key])) {
|
||||
searchParams.delete(key);
|
||||
for (const item of object[key]) {
|
||||
searchParams.append(key, item);
|
||||
}
|
||||
} else {
|
||||
searchParams.set(key, object[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
url.search = searchParams.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
|
||||
const nonString = typeof value !== 'string';
|
||||
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
||||
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
||||
: nonString;
|
||||
return needsSerialization
|
||||
? JSON.stringify(value !== undefined ? value : {})
|
||||
: (value || "");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const toPathString = function (url: URL) {
|
||||
return url.pathname + url.search + url.hash
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
||||
basePath?: string;
|
||||
baseOptions?: any;
|
||||
formDataCtor?: new () => any;
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
/**
|
||||
* parameter for apiKey security
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* parameter for oauth2 security
|
||||
* @param name security name
|
||||
* @param scopes oauth2 scope
|
||||
* @memberof Configuration
|
||||
*/
|
||||
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
||||
/**
|
||||
* override base path
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
basePath?: string;
|
||||
/**
|
||||
* base options for axios calls
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
baseOptions?: any;
|
||||
/**
|
||||
* The FormData constructor that will be used to create multipart form data
|
||||
* requests. You can inject this here so that execution environments that
|
||||
* do not support the FormData class can still run the generated client.
|
||||
*
|
||||
* @type {new () => FormData}
|
||||
*/
|
||||
formDataCtor?: new () => any;
|
||||
|
||||
constructor(param: ConfigurationParameters = {}) {
|
||||
this.apiKey = param.apiKey;
|
||||
this.username = param.username;
|
||||
this.password = param.password;
|
||||
this.accessToken = param.accessToken;
|
||||
this.basePath = param.basePath;
|
||||
this.baseOptions = param.baseOptions;
|
||||
this.formDataCtor = param.formDataCtor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the given MIME is a JSON MIME.
|
||||
* JSON MIME examples:
|
||||
* application/json
|
||||
* application/json; charset=UTF8
|
||||
* APPLICATION/JSON
|
||||
* application/vnd.company+json
|
||||
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
||||
* @return True if the given MIME is JSON, false otherwise.
|
||||
*/
|
||||
public isJsonMime(mime: string): boolean {
|
||||
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
||||
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
}
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
git_host=$4
|
||||
|
||||
if [ "$git_host" = "" ]; then
|
||||
git_host="github.com"
|
||||
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
||||
fi
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=$(git remote)
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
@ -0,0 +1,18 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export * from "./api";
|
||||
export * from "./configuration";
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
|
||||
import { Configuration } from './configuration';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
||||
@ -32,19 +32,19 @@ export interface ApiResponse {
|
||||
* @type {number}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
code?: number;
|
||||
'code'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
type?: string;
|
||||
'type'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
message?: string;
|
||||
'message'?: string;
|
||||
}
|
||||
/**
|
||||
* A category for a pet
|
||||
@ -57,13 +57,13 @@ export interface Category {
|
||||
* @type {number}
|
||||
* @memberof Category
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Category
|
||||
*/
|
||||
name?: string;
|
||||
'name'?: string;
|
||||
}
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
@ -76,37 +76,37 @@ export interface Order {
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
petId?: number;
|
||||
'petId'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
quantity?: number;
|
||||
'quantity'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Order
|
||||
*/
|
||||
shipDate?: string;
|
||||
'shipDate'?: string;
|
||||
/**
|
||||
* Order Status
|
||||
* @type {string}
|
||||
* @memberof Order
|
||||
*/
|
||||
status?: OrderStatusEnum;
|
||||
'status'?: OrderStatusEnum;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof Order
|
||||
*/
|
||||
complete?: boolean;
|
||||
'complete'?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -130,37 +130,37 @@ export interface Pet {
|
||||
* @type {number}
|
||||
* @memberof Pet
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Category}
|
||||
* @memberof Pet
|
||||
*/
|
||||
category?: Category;
|
||||
'category'?: Category;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Pet
|
||||
*/
|
||||
name: string;
|
||||
'name': string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof Pet
|
||||
*/
|
||||
photoUrls: Array<string>;
|
||||
'photoUrls': Array<string>;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Tag>}
|
||||
* @memberof Pet
|
||||
*/
|
||||
tags?: Array<Tag>;
|
||||
'tags'?: Array<Tag>;
|
||||
/**
|
||||
* pet status in the store
|
||||
* @type {string}
|
||||
* @memberof Pet
|
||||
*/
|
||||
status?: PetStatusEnum;
|
||||
'status'?: PetStatusEnum;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -184,13 +184,13 @@ export interface Tag {
|
||||
* @type {number}
|
||||
* @memberof Tag
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Tag
|
||||
*/
|
||||
name?: string;
|
||||
'name'?: string;
|
||||
}
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
@ -203,49 +203,49 @@ export interface User {
|
||||
* @type {number}
|
||||
* @memberof User
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
username?: string;
|
||||
'username'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
firstName?: string;
|
||||
'firstName'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
lastName?: string;
|
||||
'lastName'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
email?: string;
|
||||
'email'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
password?: string;
|
||||
'password'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
phone?: string;
|
||||
'phone'?: string;
|
||||
/**
|
||||
* User Status
|
||||
* @type {number}
|
||||
* @memberof User
|
||||
*/
|
||||
userStatus?: number;
|
||||
'userStatus'?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -263,7 +263,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet: async (pet: Pet, header1?: Pet, header2?: Array<Pet>, options: any = {}): Promise<RequestArgs> => {
|
||||
addPet: async (pet: Pet, header1?: Pet, header2?: Array<Pet>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'pet' is not null or undefined
|
||||
assertParamExists('addPet', 'pet', pet)
|
||||
const localVarPath = `/pet`;
|
||||
@ -313,7 +313,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('deletePet', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -355,7 +355,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise<RequestArgs> => {
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'status' is not null or undefined
|
||||
assertParamExists('findPetsByStatus', 'status', status)
|
||||
const localVarPath = `/pet/findByStatus`;
|
||||
@ -397,7 +397,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
|
||||
findPetsByTags: async (tags: Array<string>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'tags' is not null or undefined
|
||||
assertParamExists('findPetsByTags', 'tags', tags)
|
||||
const localVarPath = `/pet/findByTags`;
|
||||
@ -438,7 +438,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById: async (petId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('getPetById', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -475,7 +475,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet: async (pet: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
updatePet: async (pet: Pet, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'pet' is not null or undefined
|
||||
assertParamExists('updatePet', 'pet', pet)
|
||||
const localVarPath = `/pet`;
|
||||
@ -517,7 +517,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('updatePetWithForm', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -569,7 +569,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise<RequestArgs> => {
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('uploadFile', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}/uploadImage`
|
||||
@ -631,7 +631,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async addPet(pet: Pet, header1?: Pet, header2?: Array<Pet>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async addPet(pet: Pet, header1?: Pet, header2?: Array<Pet>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(pet, header1, header2, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -643,7 +643,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deletePet(petId: number, apiKey?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -654,7 +654,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -666,7 +666,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
async findPetsByTags(tags: Array<string>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -677,7 +677,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -688,7 +688,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatePet(pet: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updatePet(pet: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(pet, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -701,7 +701,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -714,7 +714,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -836,7 +836,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public addPet(pet: Pet, header1?: Pet, header2?: Array<Pet>, options?: any) {
|
||||
public addPet(pet: Pet, header1?: Pet, header2?: Array<Pet>, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).addPet(pet, header1, header2, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -849,7 +849,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public deletePet(petId: number, apiKey?: string, options?: any) {
|
||||
public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -861,7 +861,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -874,7 +874,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByTags(tags: Array<string>, options?: any) {
|
||||
public findPetsByTags(tags: Array<string>, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -886,7 +886,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public getPetById(petId: number, options?: any) {
|
||||
public getPetById(petId: number, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -898,7 +898,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePet(pet: Pet, options?: any) {
|
||||
public updatePet(pet: Pet, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).updatePet(pet, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -912,7 +912,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -926,7 +926,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
@ -945,7 +945,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder: async (orderId: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
assertParamExists('deleteOrder', 'orderId', orderId)
|
||||
const localVarPath = `/store/order/{orderId}`
|
||||
@ -978,7 +978,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory: async (options: any = {}): Promise<RequestArgs> => {
|
||||
getInventory: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
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);
|
||||
@ -1012,7 +1012,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById: async (orderId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
assertParamExists('getOrderById', 'orderId', orderId)
|
||||
const localVarPath = `/store/order/{orderId}`
|
||||
@ -1046,7 +1046,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder: async (order: Order, options: any = {}): Promise<RequestArgs> => {
|
||||
placeOrder: async (order: Order, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'order' is not null or undefined
|
||||
assertParamExists('placeOrder', 'order', order)
|
||||
const localVarPath = `/store/order`;
|
||||
@ -1092,7 +1092,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1102,7 +1102,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1113,7 +1113,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1124,7 +1124,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async placeOrder(order: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
async placeOrder(order: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(order, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1195,7 +1195,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public deleteOrder(orderId: string, options?: any) {
|
||||
public deleteOrder(orderId: string, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1206,7 +1206,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getInventory(options?: any) {
|
||||
public getInventory(options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1218,7 +1218,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getOrderById(orderId: number, options?: any) {
|
||||
public getOrderById(orderId: number, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1230,7 +1230,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public placeOrder(order: Order, options?: any) {
|
||||
public placeOrder(order: Order, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).placeOrder(order, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
@ -1249,7 +1249,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser: async (user: User, options: any = {}): Promise<RequestArgs> => {
|
||||
createUser: async (user: User, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'user' is not null or undefined
|
||||
assertParamExists('createUser', 'user', user)
|
||||
const localVarPath = `/user`;
|
||||
@ -1285,7 +1285,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput: async (user: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
createUsersWithArrayInput: async (user: Array<User>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'user' is not null or undefined
|
||||
assertParamExists('createUsersWithArrayInput', 'user', user)
|
||||
const localVarPath = `/user/createWithArray`;
|
||||
@ -1321,7 +1321,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput: async (user: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
createUsersWithListInput: async (user: Array<User>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'user' is not null or undefined
|
||||
assertParamExists('createUsersWithListInput', 'user', user)
|
||||
const localVarPath = `/user/createWithList`;
|
||||
@ -1357,7 +1357,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('deleteUser', 'username', username)
|
||||
const localVarPath = `/user/{username}`
|
||||
@ -1391,7 +1391,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('getUserByName', 'username', username)
|
||||
const localVarPath = `/user/{username}`
|
||||
@ -1426,7 +1426,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser: async (username: string, password: string, options: any = {}): Promise<RequestArgs> => {
|
||||
loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('loginUser', 'username', username)
|
||||
// verify required parameter 'password' is not null or undefined
|
||||
@ -1468,7 +1468,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser: async (options: any = {}): Promise<RequestArgs> => {
|
||||
logoutUser: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
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);
|
||||
@ -1500,7 +1500,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser: async (username: string, user: User, options: any = {}): Promise<RequestArgs> => {
|
||||
updateUser: async (username: string, user: User, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('updateUser', 'username', username)
|
||||
// verify required parameter 'user' is not null or undefined
|
||||
@ -1549,7 +1549,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUser(user: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUser(user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(user, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1560,7 +1560,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUsersWithArrayInput(user: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUsersWithArrayInput(user: Array<User>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(user, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1571,7 +1571,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUsersWithListInput(user: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUsersWithListInput(user: Array<User>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(user, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1582,7 +1582,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1593,7 +1593,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1605,7 +1605,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1615,7 +1615,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1627,7 +1627,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updateUser(username: string, user: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updateUser(username: string, user: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, user, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1740,7 +1740,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUser(user: User, options?: any) {
|
||||
public createUser(user: User, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUser(user, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1752,7 +1752,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithArrayInput(user: Array<User>, options?: any) {
|
||||
public createUsersWithArrayInput(user: Array<User>, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(user, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1764,7 +1764,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithListInput(user: Array<User>, options?: any) {
|
||||
public createUsersWithListInput(user: Array<User>, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(user, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1776,7 +1776,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public deleteUser(username: string, options?: any) {
|
||||
public deleteUser(username: string, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1788,7 +1788,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public getUserByName(username: string, options?: any) {
|
||||
public getUserByName(username: string, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1801,7 +1801,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public loginUser(username: string, password: string, options?: any) {
|
||||
public loginUser(username: string, password: string, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1812,7 +1812,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public logoutUser(options?: any) {
|
||||
public logoutUser(options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1825,7 +1825,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public updateUser(username: string, user: User, options?: any) {
|
||||
public updateUser(username: string, user: User, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).updateUser(username, user, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
import { Configuration } from "./configuration";
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
|
||||
export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
|
||||
|
||||
@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = {
|
||||
*/
|
||||
export interface RequestArgs {
|
||||
url: string;
|
||||
options: any;
|
||||
options: AxiosRequestConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,7 @@
|
||||
import { Configuration } from "./configuration";
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
|
||||
export const BASE_PATH = "http://petstore.swagger.io:80/v2".replace(/\/+$/, "");
|
||||
|
||||
@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = {
|
||||
*/
|
||||
export interface RequestArgs {
|
||||
url: string;
|
||||
options: any;
|
||||
options: AxiosRequestConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
|
||||
import { Configuration } from './configuration';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
||||
@ -32,19 +32,19 @@ export interface ApiResponse {
|
||||
* @type {number}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
code?: number;
|
||||
'code'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
type?: string;
|
||||
'type'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
message?: string;
|
||||
'message'?: string;
|
||||
}
|
||||
/**
|
||||
* A category for a pet
|
||||
@ -57,13 +57,13 @@ export interface Category {
|
||||
* @type {number}
|
||||
* @memberof Category
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Category
|
||||
*/
|
||||
name?: string;
|
||||
'name'?: string;
|
||||
}
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
@ -76,37 +76,37 @@ export interface Order {
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
petId?: number;
|
||||
'petId'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
quantity?: number;
|
||||
'quantity'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Order
|
||||
*/
|
||||
shipDate?: string;
|
||||
'shipDate'?: string;
|
||||
/**
|
||||
* Order Status
|
||||
* @type {string}
|
||||
* @memberof Order
|
||||
*/
|
||||
status?: OrderStatusEnum;
|
||||
'status'?: OrderStatusEnum;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof Order
|
||||
*/
|
||||
complete?: boolean;
|
||||
'complete'?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -130,37 +130,37 @@ export interface Pet {
|
||||
* @type {number}
|
||||
* @memberof Pet
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Category}
|
||||
* @memberof Pet
|
||||
*/
|
||||
category?: Category;
|
||||
'category'?: Category;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Pet
|
||||
*/
|
||||
name: string;
|
||||
'name': string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof Pet
|
||||
*/
|
||||
photoUrls: Array<string>;
|
||||
'photoUrls': Array<string>;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Tag>}
|
||||
* @memberof Pet
|
||||
*/
|
||||
tags?: Array<Tag>;
|
||||
'tags'?: Array<Tag>;
|
||||
/**
|
||||
* pet status in the store
|
||||
* @type {string}
|
||||
* @memberof Pet
|
||||
*/
|
||||
status?: PetStatusEnum;
|
||||
'status'?: PetStatusEnum;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -184,13 +184,13 @@ export interface Tag {
|
||||
* @type {number}
|
||||
* @memberof Tag
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Tag
|
||||
*/
|
||||
name?: string;
|
||||
'name'?: string;
|
||||
}
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
@ -203,49 +203,49 @@ export interface User {
|
||||
* @type {number}
|
||||
* @memberof User
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
username?: string;
|
||||
'username'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
firstName?: string;
|
||||
'firstName'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
lastName?: string;
|
||||
'lastName'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
email?: string;
|
||||
'email'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
password?: string;
|
||||
'password'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
phone?: string;
|
||||
'phone'?: string;
|
||||
/**
|
||||
* User Status
|
||||
* @type {number}
|
||||
* @memberof User
|
||||
*/
|
||||
userStatus?: number;
|
||||
'userStatus'?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -261,7 +261,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('addPet', 'body', body)
|
||||
const localVarPath = `/pet`;
|
||||
@ -302,7 +302,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('deletePet', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -344,7 +344,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise<RequestArgs> => {
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'status' is not null or undefined
|
||||
assertParamExists('findPetsByStatus', 'status', status)
|
||||
const localVarPath = `/pet/findByStatus`;
|
||||
@ -386,7 +386,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
|
||||
findPetsByTags: async (tags: Array<string>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'tags' is not null or undefined
|
||||
assertParamExists('findPetsByTags', 'tags', tags)
|
||||
const localVarPath = `/pet/findByTags`;
|
||||
@ -427,7 +427,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById: async (petId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('getPetById', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -464,7 +464,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('updatePet', 'body', body)
|
||||
const localVarPath = `/pet`;
|
||||
@ -506,7 +506,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('updatePetWithForm', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -558,7 +558,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise<RequestArgs> => {
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('uploadFile', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}/uploadImage`
|
||||
@ -618,7 +618,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async addPet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -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?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -641,7 +641,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -653,7 +653,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
async findPetsByTags(tags: Array<string>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -664,7 +664,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -675,7 +675,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatePet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -688,7 +688,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -701,7 +701,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -818,7 +818,7 @@ export interface PetApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApiInterface
|
||||
*/
|
||||
addPet(body: Pet, options?: any): AxiosPromise<void>;
|
||||
addPet(body: Pet, options?: AxiosRequestConfig): AxiosPromise<void>;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -829,7 +829,7 @@ export interface PetApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApiInterface
|
||||
*/
|
||||
deletePet(petId: number, apiKey?: string, options?: any): AxiosPromise<void>;
|
||||
deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): AxiosPromise<void>;
|
||||
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
@ -839,7 +839,7 @@ export interface PetApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApiInterface
|
||||
*/
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): AxiosPromise<Array<Pet>>;
|
||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): AxiosPromise<Array<Pet>>;
|
||||
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
@ -850,7 +850,7 @@ export interface PetApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApiInterface
|
||||
*/
|
||||
findPetsByTags(tags: Array<string>, options?: any): AxiosPromise<Array<Pet>>;
|
||||
findPetsByTags(tags: Array<string>, options?: AxiosRequestConfig): AxiosPromise<Array<Pet>>;
|
||||
|
||||
/**
|
||||
* Returns a single pet
|
||||
@ -860,7 +860,7 @@ export interface PetApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApiInterface
|
||||
*/
|
||||
getPetById(petId: number, options?: any): AxiosPromise<Pet>;
|
||||
getPetById(petId: number, options?: AxiosRequestConfig): AxiosPromise<Pet>;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -870,7 +870,7 @@ export interface PetApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApiInterface
|
||||
*/
|
||||
updatePet(body: Pet, options?: any): AxiosPromise<void>;
|
||||
updatePet(body: Pet, options?: AxiosRequestConfig): AxiosPromise<void>;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -882,7 +882,7 @@ export interface PetApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApiInterface
|
||||
*/
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): AxiosPromise<void>;
|
||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): AxiosPromise<void>;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -894,7 +894,7 @@ export interface PetApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApiInterface
|
||||
*/
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): AxiosPromise<ApiResponse>;
|
||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): AxiosPromise<ApiResponse>;
|
||||
|
||||
}
|
||||
|
||||
@ -913,7 +913,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public addPet(body: Pet, options?: any) {
|
||||
public addPet(body: Pet, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -926,7 +926,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public deletePet(petId: number, apiKey?: string, options?: any) {
|
||||
public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -938,7 +938,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -951,7 +951,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByTags(tags: Array<string>, options?: any) {
|
||||
public findPetsByTags(tags: Array<string>, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -963,7 +963,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public getPetById(petId: number, options?: any) {
|
||||
public getPetById(petId: number, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -975,7 +975,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePet(body: Pet, options?: any) {
|
||||
public updatePet(body: Pet, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -989,7 +989,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1003,7 +1003,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
@ -1022,7 +1022,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder: async (orderId: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
assertParamExists('deleteOrder', 'orderId', orderId)
|
||||
const localVarPath = `/store/order/{orderId}`
|
||||
@ -1055,7 +1055,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory: async (options: any = {}): Promise<RequestArgs> => {
|
||||
getInventory: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
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);
|
||||
@ -1089,7 +1089,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById: async (orderId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
assertParamExists('getOrderById', 'orderId', orderId)
|
||||
const localVarPath = `/store/order/{orderId}`
|
||||
@ -1123,7 +1123,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder: async (body: Order, options: any = {}): Promise<RequestArgs> => {
|
||||
placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('placeOrder', 'body', body)
|
||||
const localVarPath = `/store/order`;
|
||||
@ -1169,7 +1169,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1179,7 +1179,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1190,7 +1190,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1201,7 +1201,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async placeOrder(body: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1271,7 +1271,7 @@ export interface StoreApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApiInterface
|
||||
*/
|
||||
deleteOrder(orderId: string, options?: any): AxiosPromise<void>;
|
||||
deleteOrder(orderId: string, options?: AxiosRequestConfig): AxiosPromise<void>;
|
||||
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
@ -1280,7 +1280,7 @@ export interface StoreApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApiInterface
|
||||
*/
|
||||
getInventory(options?: any): AxiosPromise<{ [key: string]: number; }>;
|
||||
getInventory(options?: AxiosRequestConfig): AxiosPromise<{ [key: string]: number; }>;
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
@ -1290,7 +1290,7 @@ export interface StoreApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApiInterface
|
||||
*/
|
||||
getOrderById(orderId: number, options?: any): AxiosPromise<Order>;
|
||||
getOrderById(orderId: number, options?: AxiosRequestConfig): AxiosPromise<Order>;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -1300,7 +1300,7 @@ export interface StoreApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApiInterface
|
||||
*/
|
||||
placeOrder(body: Order, options?: any): AxiosPromise<Order>;
|
||||
placeOrder(body: Order, options?: AxiosRequestConfig): AxiosPromise<Order>;
|
||||
|
||||
}
|
||||
|
||||
@ -1319,7 +1319,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public deleteOrder(orderId: string, options?: any) {
|
||||
public deleteOrder(orderId: string, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1330,7 +1330,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getInventory(options?: any) {
|
||||
public getInventory(options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1342,7 +1342,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getOrderById(orderId: number, options?: any) {
|
||||
public getOrderById(orderId: number, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1354,7 +1354,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public placeOrder(body: Order, options?: any) {
|
||||
public placeOrder(body: Order, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
@ -1373,7 +1373,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser: async (body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
createUser: async (body: User, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('createUser', 'body', body)
|
||||
const localVarPath = `/user`;
|
||||
@ -1409,7 +1409,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
createUsersWithArrayInput: async (body: Array<User>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('createUsersWithArrayInput', 'body', body)
|
||||
const localVarPath = `/user/createWithArray`;
|
||||
@ -1445,7 +1445,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
createUsersWithListInput: async (body: Array<User>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('createUsersWithListInput', 'body', body)
|
||||
const localVarPath = `/user/createWithList`;
|
||||
@ -1481,7 +1481,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('deleteUser', 'username', username)
|
||||
const localVarPath = `/user/{username}`
|
||||
@ -1515,7 +1515,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('getUserByName', 'username', username)
|
||||
const localVarPath = `/user/{username}`
|
||||
@ -1550,7 +1550,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser: async (username: string, password: string, options: any = {}): Promise<RequestArgs> => {
|
||||
loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('loginUser', 'username', username)
|
||||
// verify required parameter 'password' is not null or undefined
|
||||
@ -1592,7 +1592,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser: async (options: any = {}): Promise<RequestArgs> => {
|
||||
logoutUser: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
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);
|
||||
@ -1624,7 +1624,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser: async (username: string, body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('updateUser', 'username', username)
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
@ -1673,7 +1673,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUser(body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1684,7 +1684,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUsersWithArrayInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUsersWithArrayInput(body: Array<User>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1695,7 +1695,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUsersWithListInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUsersWithListInput(body: Array<User>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1706,7 +1706,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1717,7 +1717,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1729,7 +1729,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1739,7 +1739,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1751,7 +1751,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updateUser(username: string, body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1863,7 +1863,7 @@ export interface UserApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApiInterface
|
||||
*/
|
||||
createUser(body: User, options?: any): AxiosPromise<void>;
|
||||
createUser(body: User, options?: AxiosRequestConfig): AxiosPromise<void>;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -1873,7 +1873,7 @@ export interface UserApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApiInterface
|
||||
*/
|
||||
createUsersWithArrayInput(body: Array<User>, options?: any): AxiosPromise<void>;
|
||||
createUsersWithArrayInput(body: Array<User>, options?: AxiosRequestConfig): AxiosPromise<void>;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -1883,7 +1883,7 @@ export interface UserApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApiInterface
|
||||
*/
|
||||
createUsersWithListInput(body: Array<User>, options?: any): AxiosPromise<void>;
|
||||
createUsersWithListInput(body: Array<User>, options?: AxiosRequestConfig): AxiosPromise<void>;
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
@ -1893,7 +1893,7 @@ export interface UserApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApiInterface
|
||||
*/
|
||||
deleteUser(username: string, options?: any): AxiosPromise<void>;
|
||||
deleteUser(username: string, options?: AxiosRequestConfig): AxiosPromise<void>;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -1903,7 +1903,7 @@ export interface UserApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApiInterface
|
||||
*/
|
||||
getUserByName(username: string, options?: any): AxiosPromise<User>;
|
||||
getUserByName(username: string, options?: AxiosRequestConfig): AxiosPromise<User>;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -1914,7 +1914,7 @@ export interface UserApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApiInterface
|
||||
*/
|
||||
loginUser(username: string, password: string, options?: any): AxiosPromise<string>;
|
||||
loginUser(username: string, password: string, options?: AxiosRequestConfig): AxiosPromise<string>;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -1923,7 +1923,7 @@ export interface UserApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApiInterface
|
||||
*/
|
||||
logoutUser(options?: any): AxiosPromise<void>;
|
||||
logoutUser(options?: AxiosRequestConfig): AxiosPromise<void>;
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
@ -1934,7 +1934,7 @@ export interface UserApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApiInterface
|
||||
*/
|
||||
updateUser(username: string, body: User, options?: any): AxiosPromise<void>;
|
||||
updateUser(username: string, body: User, options?: AxiosRequestConfig): AxiosPromise<void>;
|
||||
|
||||
}
|
||||
|
||||
@ -1953,7 +1953,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUser(body: User, options?: any) {
|
||||
public createUser(body: User, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1965,7 +1965,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithArrayInput(body: Array<User>, options?: any) {
|
||||
public createUsersWithArrayInput(body: Array<User>, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1977,7 +1977,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithListInput(body: Array<User>, options?: any) {
|
||||
public createUsersWithListInput(body: Array<User>, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1989,7 +1989,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public deleteUser(username: string, options?: any) {
|
||||
public deleteUser(username: string, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -2001,7 +2001,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public getUserByName(username: string, options?: any) {
|
||||
public getUserByName(username: string, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -2014,7 +2014,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public loginUser(username: string, password: string, options?: any) {
|
||||
public loginUser(username: string, password: string, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -2025,7 +2025,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public logoutUser(options?: any) {
|
||||
public logoutUser(options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -2038,7 +2038,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public updateUser(username: string, body: User, options?: any) {
|
||||
public updateUser(username: string, body: User, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
import { Configuration } from "./configuration";
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
|
||||
export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
|
||||
|
||||
@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = {
|
||||
*/
|
||||
export interface RequestArgs {
|
||||
url: string;
|
||||
options: any;
|
||||
options: AxiosRequestConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
import { Configuration } from '../../../configuration';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
@ -37,7 +37,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('addPet', 'body', body)
|
||||
const localVarPath = `/pet`;
|
||||
@ -78,7 +78,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('deletePet', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -120,7 +120,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise<RequestArgs> => {
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'status' is not null or undefined
|
||||
assertParamExists('findPetsByStatus', 'status', status)
|
||||
const localVarPath = `/pet/findByStatus`;
|
||||
@ -162,7 +162,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
|
||||
findPetsByTags: async (tags: Array<string>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'tags' is not null or undefined
|
||||
assertParamExists('findPetsByTags', 'tags', tags)
|
||||
const localVarPath = `/pet/findByTags`;
|
||||
@ -203,7 +203,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById: async (petId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('getPetById', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -240,7 +240,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('updatePet', 'body', body)
|
||||
const localVarPath = `/pet`;
|
||||
@ -282,7 +282,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('updatePetWithForm', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -334,7 +334,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise<RequestArgs> => {
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('uploadFile', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}/uploadImage`
|
||||
@ -394,7 +394,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async addPet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -406,7 +406,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deletePet(petId: number, apiKey?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -417,7 +417,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -429,7 +429,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
async findPetsByTags(tags: Array<string>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -440,7 +440,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -451,7 +451,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatePet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -464,7 +464,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -477,7 +477,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -595,7 +595,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public addPet(body: Pet, options?: any) {
|
||||
public addPet(body: Pet, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -608,7 +608,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public deletePet(petId: number, apiKey?: string, options?: any) {
|
||||
public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -620,7 +620,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -633,7 +633,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByTags(tags: Array<string>, options?: any) {
|
||||
public findPetsByTags(tags: Array<string>, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -645,7 +645,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public getPetById(petId: number, options?: any) {
|
||||
public getPetById(petId: number, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -657,7 +657,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePet(body: Pet, options?: any) {
|
||||
public updatePet(body: Pet, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -671,7 +671,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -685,7 +685,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
import { Configuration } from '../../../configuration';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
@ -35,7 +35,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder: async (orderId: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
assertParamExists('deleteOrder', 'orderId', orderId)
|
||||
const localVarPath = `/store/order/{orderId}`
|
||||
@ -68,7 +68,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory: async (options: any = {}): Promise<RequestArgs> => {
|
||||
getInventory: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
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);
|
||||
@ -102,7 +102,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById: async (orderId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
assertParamExists('getOrderById', 'orderId', orderId)
|
||||
const localVarPath = `/store/order/{orderId}`
|
||||
@ -136,7 +136,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder: async (body: Order, options: any = {}): Promise<RequestArgs> => {
|
||||
placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('placeOrder', 'body', body)
|
||||
const localVarPath = `/store/order`;
|
||||
@ -182,7 +182,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -192,7 +192,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -203,7 +203,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -214,7 +214,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async placeOrder(body: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -285,7 +285,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public deleteOrder(orderId: string, options?: any) {
|
||||
public deleteOrder(orderId: string, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -296,7 +296,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getInventory(options?: any) {
|
||||
public getInventory(options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -308,7 +308,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getOrderById(orderId: number, options?: any) {
|
||||
public getOrderById(orderId: number, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -320,7 +320,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public placeOrder(body: Order, options?: any) {
|
||||
public placeOrder(body: Order, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
import { Configuration } from '../../../configuration';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
@ -35,7 +35,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser: async (body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
createUser: async (body: User, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('createUser', 'body', body)
|
||||
const localVarPath = `/user`;
|
||||
@ -71,7 +71,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
createUsersWithArrayInput: async (body: Array<User>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('createUsersWithArrayInput', 'body', body)
|
||||
const localVarPath = `/user/createWithArray`;
|
||||
@ -107,7 +107,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
createUsersWithListInput: async (body: Array<User>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('createUsersWithListInput', 'body', body)
|
||||
const localVarPath = `/user/createWithList`;
|
||||
@ -143,7 +143,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('deleteUser', 'username', username)
|
||||
const localVarPath = `/user/{username}`
|
||||
@ -177,7 +177,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('getUserByName', 'username', username)
|
||||
const localVarPath = `/user/{username}`
|
||||
@ -212,7 +212,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser: async (username: string, password: string, options: any = {}): Promise<RequestArgs> => {
|
||||
loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('loginUser', 'username', username)
|
||||
// verify required parameter 'password' is not null or undefined
|
||||
@ -254,7 +254,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser: async (options: any = {}): Promise<RequestArgs> => {
|
||||
logoutUser: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
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);
|
||||
@ -286,7 +286,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser: async (username: string, body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('updateUser', 'username', username)
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
@ -335,7 +335,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUser(body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -346,7 +346,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUsersWithArrayInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUsersWithArrayInput(body: Array<User>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -357,7 +357,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUsersWithListInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUsersWithListInput(body: Array<User>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -368,7 +368,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -379,7 +379,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -391,7 +391,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -401,7 +401,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -413,7 +413,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updateUser(username: string, body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -526,7 +526,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUser(body: User, options?: any) {
|
||||
public createUser(body: User, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -538,7 +538,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithArrayInput(body: Array<User>, options?: any) {
|
||||
public createUsersWithArrayInput(body: Array<User>, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -550,7 +550,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithListInput(body: Array<User>, options?: any) {
|
||||
public createUsersWithListInput(body: Array<User>, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -562,7 +562,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public deleteUser(username: string, options?: any) {
|
||||
public deleteUser(username: string, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -574,7 +574,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public getUserByName(username: string, options?: any) {
|
||||
public getUserByName(username: string, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -587,7 +587,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public loginUser(username: string, password: string, options?: any) {
|
||||
public loginUser(username: string, password: string, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -598,7 +598,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public logoutUser(options?: any) {
|
||||
public logoutUser(options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -611,7 +611,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public updateUser(username: string, body: User, options?: any) {
|
||||
public updateUser(username: string, body: User, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
import { Configuration } from "./configuration";
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
|
||||
export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
|
||||
|
||||
@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = {
|
||||
*/
|
||||
export interface RequestArgs {
|
||||
url: string;
|
||||
options: any;
|
||||
options: AxiosRequestConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -25,18 +25,18 @@ export interface ApiResponse {
|
||||
* @type {number}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
code?: number;
|
||||
'code'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
type?: string;
|
||||
'type'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
message?: string;
|
||||
'message'?: string;
|
||||
}
|
||||
|
||||
|
@ -25,12 +25,12 @@ export interface Category {
|
||||
* @type {number}
|
||||
* @memberof Category
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Category
|
||||
*/
|
||||
name?: string;
|
||||
'name'?: string;
|
||||
}
|
||||
|
||||
|
@ -25,37 +25,37 @@ export interface Order {
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
petId?: number;
|
||||
'petId'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
quantity?: number;
|
||||
'quantity'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Order
|
||||
*/
|
||||
shipDate?: string;
|
||||
'shipDate'?: string;
|
||||
/**
|
||||
* Order Status
|
||||
* @type {string}
|
||||
* @memberof Order
|
||||
*/
|
||||
status?: OrderStatusEnum;
|
||||
'status'?: OrderStatusEnum;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof Order
|
||||
*/
|
||||
complete?: boolean;
|
||||
'complete'?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -27,37 +27,37 @@ export interface Pet {
|
||||
* @type {number}
|
||||
* @memberof Pet
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Category}
|
||||
* @memberof Pet
|
||||
*/
|
||||
category?: Category;
|
||||
'category'?: Category;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Pet
|
||||
*/
|
||||
name: string;
|
||||
'name': string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof Pet
|
||||
*/
|
||||
photoUrls: Array<string>;
|
||||
'photoUrls': Array<string>;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Tag>}
|
||||
* @memberof Pet
|
||||
*/
|
||||
tags?: Array<Tag>;
|
||||
'tags'?: Array<Tag>;
|
||||
/**
|
||||
* pet status in the store
|
||||
* @type {string}
|
||||
* @memberof Pet
|
||||
*/
|
||||
status?: PetStatusEnum;
|
||||
'status'?: PetStatusEnum;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -25,12 +25,12 @@ export interface Tag {
|
||||
* @type {number}
|
||||
* @memberof Tag
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Tag
|
||||
*/
|
||||
name?: string;
|
||||
'name'?: string;
|
||||
}
|
||||
|
||||
|
@ -25,48 +25,48 @@ export interface User {
|
||||
* @type {number}
|
||||
* @memberof User
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
username?: string;
|
||||
'username'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
firstName?: string;
|
||||
'firstName'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
lastName?: string;
|
||||
'lastName'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
email?: string;
|
||||
'email'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
password?: string;
|
||||
'password'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
phone?: string;
|
||||
'phone'?: string;
|
||||
/**
|
||||
* User Status
|
||||
* @type {number}
|
||||
* @memberof User
|
||||
*/
|
||||
userStatus?: number;
|
||||
'userStatus'?: number;
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
|
||||
import { Configuration } from './configuration';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
||||
@ -32,19 +32,19 @@ export interface ApiResponse {
|
||||
* @type {number}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
code?: number;
|
||||
'code'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
type?: string;
|
||||
'type'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
message?: string;
|
||||
'message'?: string;
|
||||
}
|
||||
/**
|
||||
* A category for a pet
|
||||
@ -57,13 +57,13 @@ export interface Category {
|
||||
* @type {number}
|
||||
* @memberof Category
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Category
|
||||
*/
|
||||
name?: string;
|
||||
'name'?: string;
|
||||
}
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
@ -76,37 +76,37 @@ export interface Order {
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
petId?: number;
|
||||
'petId'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
quantity?: number;
|
||||
'quantity'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Order
|
||||
*/
|
||||
shipDate?: string;
|
||||
'shipDate'?: string;
|
||||
/**
|
||||
* Order Status
|
||||
* @type {string}
|
||||
* @memberof Order
|
||||
*/
|
||||
status?: OrderStatusEnum;
|
||||
'status'?: OrderStatusEnum;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof Order
|
||||
*/
|
||||
complete?: boolean;
|
||||
'complete'?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -130,37 +130,37 @@ export interface Pet {
|
||||
* @type {number}
|
||||
* @memberof Pet
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Category}
|
||||
* @memberof Pet
|
||||
*/
|
||||
category?: Category;
|
||||
'category'?: Category;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Pet
|
||||
*/
|
||||
name: string;
|
||||
'name': string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof Pet
|
||||
*/
|
||||
photoUrls: Array<string>;
|
||||
'photoUrls': Array<string>;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Tag>}
|
||||
* @memberof Pet
|
||||
*/
|
||||
tags?: Array<Tag>;
|
||||
'tags'?: Array<Tag>;
|
||||
/**
|
||||
* pet status in the store
|
||||
* @type {string}
|
||||
* @memberof Pet
|
||||
*/
|
||||
status?: PetStatusEnum;
|
||||
'status'?: PetStatusEnum;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -184,13 +184,13 @@ export interface Tag {
|
||||
* @type {number}
|
||||
* @memberof Tag
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Tag
|
||||
*/
|
||||
name?: string;
|
||||
'name'?: string;
|
||||
}
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
@ -203,49 +203,49 @@ export interface User {
|
||||
* @type {number}
|
||||
* @memberof User
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
username?: string;
|
||||
'username'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
firstName?: string;
|
||||
'firstName'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
lastName?: string;
|
||||
'lastName'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
email?: string;
|
||||
'email'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
password?: string;
|
||||
'password'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
phone?: string;
|
||||
'phone'?: string;
|
||||
/**
|
||||
* User Status
|
||||
* @type {number}
|
||||
* @memberof User
|
||||
*/
|
||||
userStatus?: number;
|
||||
'userStatus'?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -261,7 +261,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('addPet', 'body', body)
|
||||
const localVarPath = `/pet`;
|
||||
@ -302,7 +302,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('deletePet', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -344,7 +344,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise<RequestArgs> => {
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'status' is not null or undefined
|
||||
assertParamExists('findPetsByStatus', 'status', status)
|
||||
const localVarPath = `/pet/findByStatus`;
|
||||
@ -386,7 +386,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
|
||||
findPetsByTags: async (tags: Array<string>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'tags' is not null or undefined
|
||||
assertParamExists('findPetsByTags', 'tags', tags)
|
||||
const localVarPath = `/pet/findByTags`;
|
||||
@ -427,7 +427,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById: async (petId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('getPetById', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -464,7 +464,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('updatePet', 'body', body)
|
||||
const localVarPath = `/pet`;
|
||||
@ -506,7 +506,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('updatePetWithForm', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -558,7 +558,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise<RequestArgs> => {
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('uploadFile', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}/uploadImage`
|
||||
@ -618,7 +618,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async addPet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -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?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -641,7 +641,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -653,7 +653,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
async findPetsByTags(tags: Array<string>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -664,7 +664,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -675,7 +675,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatePet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -688,7 +688,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -701,7 +701,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -819,7 +819,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public addPet(body: Pet, options?: any) {
|
||||
public addPet(body: Pet, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).addPet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -832,7 +832,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public deletePet(petId: number, apiKey?: string, options?: any) {
|
||||
public deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -844,7 +844,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).findPetsByStatus(status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -857,7 +857,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByTags(tags: Array<string>, options?: any) {
|
||||
public findPetsByTags(tags: Array<string>, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).findPetsByTags(tags, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -869,7 +869,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public getPetById(petId: number, options?: any) {
|
||||
public getPetById(petId: number, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).getPetById(petId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -881,7 +881,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePet(body: Pet, options?: any) {
|
||||
public updatePet(body: Pet, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).updatePet(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -895,7 +895,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -909,7 +909,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
@ -928,7 +928,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder: async (orderId: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
assertParamExists('deleteOrder', 'orderId', orderId)
|
||||
const localVarPath = `/store/order/{orderId}`
|
||||
@ -961,7 +961,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory: async (options: any = {}): Promise<RequestArgs> => {
|
||||
getInventory: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
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);
|
||||
@ -995,7 +995,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById: async (orderId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
assertParamExists('getOrderById', 'orderId', orderId)
|
||||
const localVarPath = `/store/order/{orderId}`
|
||||
@ -1029,7 +1029,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder: async (body: Order, options: any = {}): Promise<RequestArgs> => {
|
||||
placeOrder: async (body: Order, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('placeOrder', 'body', body)
|
||||
const localVarPath = `/store/order`;
|
||||
@ -1075,7 +1075,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1085,7 +1085,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1096,7 +1096,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1107,7 +1107,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async placeOrder(body: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
async placeOrder(body: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1178,7 +1178,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public deleteOrder(orderId: string, options?: any) {
|
||||
public deleteOrder(orderId: string, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1189,7 +1189,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getInventory(options?: any) {
|
||||
public getInventory(options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1201,7 +1201,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getOrderById(orderId: number, options?: any) {
|
||||
public getOrderById(orderId: number, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).getOrderById(orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1213,7 +1213,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public placeOrder(body: Order, options?: any) {
|
||||
public placeOrder(body: Order, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
@ -1232,7 +1232,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser: async (body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
createUser: async (body: User, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('createUser', 'body', body)
|
||||
const localVarPath = `/user`;
|
||||
@ -1268,7 +1268,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
createUsersWithArrayInput: async (body: Array<User>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('createUsersWithArrayInput', 'body', body)
|
||||
const localVarPath = `/user/createWithArray`;
|
||||
@ -1304,7 +1304,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
createUsersWithListInput: async (body: Array<User>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('createUsersWithListInput', 'body', body)
|
||||
const localVarPath = `/user/createWithList`;
|
||||
@ -1340,7 +1340,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('deleteUser', 'username', username)
|
||||
const localVarPath = `/user/{username}`
|
||||
@ -1374,7 +1374,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('getUserByName', 'username', username)
|
||||
const localVarPath = `/user/{username}`
|
||||
@ -1409,7 +1409,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser: async (username: string, password: string, options: any = {}): Promise<RequestArgs> => {
|
||||
loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('loginUser', 'username', username)
|
||||
// verify required parameter 'password' is not null or undefined
|
||||
@ -1451,7 +1451,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser: async (options: any = {}): Promise<RequestArgs> => {
|
||||
logoutUser: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
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);
|
||||
@ -1483,7 +1483,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser: async (username: string, body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('updateUser', 'username', username)
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
@ -1532,7 +1532,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUser(body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1543,7 +1543,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUsersWithArrayInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUsersWithArrayInput(body: Array<User>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1554,7 +1554,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUsersWithListInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUsersWithListInput(body: Array<User>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1565,7 +1565,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1576,7 +1576,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1588,7 +1588,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1598,7 +1598,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1610,7 +1610,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updateUser(username: string, body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1723,7 +1723,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUser(body: User, options?: any) {
|
||||
public createUser(body: User, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1735,7 +1735,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithArrayInput(body: Array<User>, options?: any) {
|
||||
public createUsersWithArrayInput(body: Array<User>, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1747,7 +1747,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithListInput(body: Array<User>, options?: any) {
|
||||
public createUsersWithListInput(body: Array<User>, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1759,7 +1759,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public deleteUser(username: string, options?: any) {
|
||||
public deleteUser(username: string, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).deleteUser(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1771,7 +1771,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public getUserByName(username: string, options?: any) {
|
||||
public getUserByName(username: string, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).getUserByName(username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1784,7 +1784,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public loginUser(username: string, password: string, options?: any) {
|
||||
public loginUser(username: string, password: string, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).loginUser(username, password, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1795,7 +1795,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public logoutUser(options?: any) {
|
||||
public logoutUser(options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1808,7 +1808,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public updateUser(username: string, body: User, options?: any) {
|
||||
public updateUser(username: string, body: User, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
import { Configuration } from "./configuration";
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
|
||||
export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
|
||||
|
||||
@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = {
|
||||
*/
|
||||
export interface RequestArgs {
|
||||
url: string;
|
||||
options: any;
|
||||
options: AxiosRequestConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
|
||||
import { Configuration } from './configuration';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
||||
@ -32,19 +32,19 @@ export interface ApiResponse {
|
||||
* @type {number}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
code?: number;
|
||||
'code'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
type?: string;
|
||||
'type'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ApiResponse
|
||||
*/
|
||||
message?: string;
|
||||
'message'?: string;
|
||||
}
|
||||
/**
|
||||
* A category for a pet
|
||||
@ -57,13 +57,13 @@ export interface Category {
|
||||
* @type {number}
|
||||
* @memberof Category
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Category
|
||||
*/
|
||||
name?: string;
|
||||
'name'?: string;
|
||||
}
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
@ -76,37 +76,37 @@ export interface Order {
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
petId?: number;
|
||||
'petId'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
quantity?: number;
|
||||
'quantity'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Order
|
||||
*/
|
||||
shipDate?: string;
|
||||
'shipDate'?: string;
|
||||
/**
|
||||
* Order Status
|
||||
* @type {string}
|
||||
* @memberof Order
|
||||
*/
|
||||
status?: OrderStatusEnum;
|
||||
'status'?: OrderStatusEnum;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof Order
|
||||
*/
|
||||
complete?: boolean;
|
||||
'complete'?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -130,37 +130,37 @@ export interface Pet {
|
||||
* @type {number}
|
||||
* @memberof Pet
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Category}
|
||||
* @memberof Pet
|
||||
*/
|
||||
category?: Category;
|
||||
'category'?: Category;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Pet
|
||||
*/
|
||||
name: string;
|
||||
'name': string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof Pet
|
||||
*/
|
||||
photoUrls: Array<string>;
|
||||
'photoUrls': Array<string>;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Tag>}
|
||||
* @memberof Pet
|
||||
*/
|
||||
tags?: Array<Tag>;
|
||||
'tags'?: Array<Tag>;
|
||||
/**
|
||||
* pet status in the store
|
||||
* @type {string}
|
||||
* @memberof Pet
|
||||
*/
|
||||
status?: PetStatusEnum;
|
||||
'status'?: PetStatusEnum;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -184,13 +184,13 @@ export interface Tag {
|
||||
* @type {number}
|
||||
* @memberof Tag
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Tag
|
||||
*/
|
||||
name?: string;
|
||||
'name'?: string;
|
||||
}
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
@ -203,49 +203,49 @@ export interface User {
|
||||
* @type {number}
|
||||
* @memberof User
|
||||
*/
|
||||
id?: number;
|
||||
'id'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
username?: string;
|
||||
'username'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
firstName?: string;
|
||||
'firstName'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
lastName?: string;
|
||||
'lastName'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
email?: string;
|
||||
'email'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
password?: string;
|
||||
'password'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
phone?: string;
|
||||
'phone'?: string;
|
||||
/**
|
||||
* User Status
|
||||
* @type {number}
|
||||
* @memberof User
|
||||
*/
|
||||
userStatus?: number;
|
||||
'userStatus'?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -261,7 +261,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
addPet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
addPet: async (body: Pet, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('addPet', 'body', body)
|
||||
const localVarPath = `/pet`;
|
||||
@ -302,7 +302,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deletePet: async (petId: number, apiKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('deletePet', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -344,7 +344,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise<RequestArgs> => {
|
||||
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'status' is not null or undefined
|
||||
assertParamExists('findPetsByStatus', 'status', status)
|
||||
const localVarPath = `/pet/findByStatus`;
|
||||
@ -386,7 +386,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
|
||||
findPetsByTags: async (tags: Array<string>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'tags' is not null or undefined
|
||||
assertParamExists('findPetsByTags', 'tags', tags)
|
||||
const localVarPath = `/pet/findByTags`;
|
||||
@ -427,7 +427,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getPetById: async (petId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
getPetById: async (petId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('getPetById', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -464,7 +464,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePet: async (body: Pet, options: any = {}): Promise<RequestArgs> => {
|
||||
updatePet: async (body: Pet, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('updatePet', 'body', body)
|
||||
const localVarPath = `/pet`;
|
||||
@ -506,7 +506,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise<RequestArgs> => {
|
||||
updatePetWithForm: async (petId: number, name?: string, status?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('updatePetWithForm', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}`
|
||||
@ -558,7 +558,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise<RequestArgs> => {
|
||||
uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'petId' is not null or undefined
|
||||
assertParamExists('uploadFile', 'petId', petId)
|
||||
const localVarPath = `/pet/{petId}/uploadImage`
|
||||
@ -618,7 +618,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async addPet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async addPet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.addPet(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -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?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deletePet(petId: number, apiKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deletePet(petId, apiKey, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -641,7 +641,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByStatus(status, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -653,7 +653,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
async findPetsByTags(tags: Array<string>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.findPetsByTags(tags, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -664,7 +664,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
async getPetById(petId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getPetById(petId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -675,7 +675,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatePet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updatePet(body: Pet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePet(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -688,7 +688,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updatePetWithForm(petId: number, name?: string, status?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePetWithForm(petId, name, status, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -701,7 +701,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(petId, additionalMetadata, file, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -966,7 +966,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public addPet(requestParameters: PetApiAddPetRequest, options?: any) {
|
||||
public addPet(requestParameters: PetApiAddPetRequest, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).addPet(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -978,7 +978,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public deletePet(requestParameters: PetApiDeletePetRequest, options?: any) {
|
||||
public deletePet(requestParameters: PetApiDeletePetRequest, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).deletePet(requestParameters.petId, requestParameters.apiKey, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -990,7 +990,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByStatus(requestParameters: PetApiFindPetsByStatusRequest, options?: any) {
|
||||
public findPetsByStatus(requestParameters: PetApiFindPetsByStatusRequest, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).findPetsByStatus(requestParameters.status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1003,7 +1003,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public findPetsByTags(requestParameters: PetApiFindPetsByTagsRequest, options?: any) {
|
||||
public findPetsByTags(requestParameters: PetApiFindPetsByTagsRequest, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).findPetsByTags(requestParameters.tags, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1015,7 +1015,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public getPetById(requestParameters: PetApiGetPetByIdRequest, options?: any) {
|
||||
public getPetById(requestParameters: PetApiGetPetByIdRequest, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).getPetById(requestParameters.petId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1027,7 +1027,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePet(requestParameters: PetApiUpdatePetRequest, options?: any) {
|
||||
public updatePet(requestParameters: PetApiUpdatePetRequest, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).updatePet(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1039,7 +1039,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public updatePetWithForm(requestParameters: PetApiUpdatePetWithFormRequest, options?: any) {
|
||||
public updatePetWithForm(requestParameters: PetApiUpdatePetWithFormRequest, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).updatePetWithForm(requestParameters.petId, requestParameters.name, requestParameters.status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1051,7 +1051,7 @@ export class PetApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApi
|
||||
*/
|
||||
public uploadFile(requestParameters: PetApiUploadFileRequest, options?: any) {
|
||||
public uploadFile(requestParameters: PetApiUploadFileRequest, options?: AxiosRequestConfig) {
|
||||
return PetApiFp(this.configuration).uploadFile(requestParameters.petId, requestParameters.additionalMetadata, requestParameters.file, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
@ -1070,7 +1070,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteOrder: async (orderId: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deleteOrder: async (orderId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
assertParamExists('deleteOrder', 'orderId', orderId)
|
||||
const localVarPath = `/store/order/{orderId}`
|
||||
@ -1103,7 +1103,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getInventory: async (options: any = {}): Promise<RequestArgs> => {
|
||||
getInventory: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
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);
|
||||
@ -1137,7 +1137,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getOrderById: async (orderId: number, options: any = {}): Promise<RequestArgs> => {
|
||||
getOrderById: async (orderId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'orderId' is not null or undefined
|
||||
assertParamExists('getOrderById', 'orderId', orderId)
|
||||
const localVarPath = `/store/order/{orderId}`
|
||||
@ -1171,7 +1171,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
placeOrder: async (body?: Order, options: any = {}): Promise<RequestArgs> => {
|
||||
placeOrder: async (body?: Order, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
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);
|
||||
@ -1215,7 +1215,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deleteOrder(orderId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOrder(orderId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1225,7 +1225,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
async getInventory(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1236,7 +1236,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
async getOrderById(orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(orderId, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1247,7 +1247,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async placeOrder(body?: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
async placeOrder(body?: Order, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1360,7 +1360,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public deleteOrder(requestParameters: StoreApiDeleteOrderRequest, options?: any) {
|
||||
public deleteOrder(requestParameters: StoreApiDeleteOrderRequest, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).deleteOrder(requestParameters.orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1371,7 +1371,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getInventory(options?: any) {
|
||||
public getInventory(options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1383,7 +1383,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public getOrderById(requestParameters: StoreApiGetOrderByIdRequest, options?: any) {
|
||||
public getOrderById(requestParameters: StoreApiGetOrderByIdRequest, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).getOrderById(requestParameters.orderId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -1395,7 +1395,7 @@ export class StoreApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApi
|
||||
*/
|
||||
public placeOrder(requestParameters: StoreApiPlaceOrderRequest = {}, options?: any) {
|
||||
public placeOrder(requestParameters: StoreApiPlaceOrderRequest = {}, options?: AxiosRequestConfig) {
|
||||
return StoreApiFp(this.configuration).placeOrder(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
@ -1414,7 +1414,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUser: async (body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
createUser: async (body: User, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('createUser', 'body', body)
|
||||
const localVarPath = `/user`;
|
||||
@ -1450,7 +1450,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithArrayInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
createUsersWithArrayInput: async (body: Array<User>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('createUsersWithArrayInput', 'body', body)
|
||||
const localVarPath = `/user/createWithArray`;
|
||||
@ -1486,7 +1486,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUsersWithListInput: async (body: Array<User>, options: any = {}): Promise<RequestArgs> => {
|
||||
createUsersWithListInput: async (body: Array<User>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
assertParamExists('createUsersWithListInput', 'body', body)
|
||||
const localVarPath = `/user/createWithList`;
|
||||
@ -1522,7 +1522,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteUser: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
deleteUser: async (username: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('deleteUser', 'username', username)
|
||||
const localVarPath = `/user/{username}`
|
||||
@ -1556,7 +1556,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getUserByName: async (username: string, options: any = {}): Promise<RequestArgs> => {
|
||||
getUserByName: async (username: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('getUserByName', 'username', username)
|
||||
const localVarPath = `/user/{username}`
|
||||
@ -1591,7 +1591,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
loginUser: async (username: string, password: string, options: any = {}): Promise<RequestArgs> => {
|
||||
loginUser: async (username: string, password: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('loginUser', 'username', username)
|
||||
// verify required parameter 'password' is not null or undefined
|
||||
@ -1633,7 +1633,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
logoutUser: async (options: any = {}): Promise<RequestArgs> => {
|
||||
logoutUser: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
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);
|
||||
@ -1665,7 +1665,7 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUser: async (username: string, body: User, options: any = {}): Promise<RequestArgs> => {
|
||||
updateUser: async (username: string, body: User, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
assertParamExists('updateUser', 'username', username)
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
@ -1714,7 +1714,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUser(body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUser(body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1725,7 +1725,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUsersWithArrayInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUsersWithArrayInput(body: Array<User>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithArrayInput(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1736,7 +1736,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUsersWithListInput(body: Array<User>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async createUsersWithListInput(body: Array<User>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUsersWithListInput(body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1747,7 +1747,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async deleteUser(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(username, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1758,7 +1758,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
async getUserByName(username: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getUserByName(username, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1770,7 +1770,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
async loginUser(username: string, password: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.loginUser(username, password, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1780,7 +1780,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async logoutUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.logoutUser(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -1792,7 +1792,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updateUser(username: string, body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
async updateUser(username: string, body: User, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(username, body, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
@ -2017,7 +2017,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUser(requestParameters: UserApiCreateUserRequest, options?: any) {
|
||||
public createUser(requestParameters: UserApiCreateUserRequest, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUser(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -2029,7 +2029,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithArrayInput(requestParameters: UserApiCreateUsersWithArrayInputRequest, options?: any) {
|
||||
public createUsersWithArrayInput(requestParameters: UserApiCreateUsersWithArrayInputRequest, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUsersWithArrayInput(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -2041,7 +2041,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public createUsersWithListInput(requestParameters: UserApiCreateUsersWithListInputRequest, options?: any) {
|
||||
public createUsersWithListInput(requestParameters: UserApiCreateUsersWithListInputRequest, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).createUsersWithListInput(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -2053,7 +2053,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public deleteUser(requestParameters: UserApiDeleteUserRequest, options?: any) {
|
||||
public deleteUser(requestParameters: UserApiDeleteUserRequest, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).deleteUser(requestParameters.username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -2065,7 +2065,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public getUserByName(requestParameters: UserApiGetUserByNameRequest, options?: any) {
|
||||
public getUserByName(requestParameters: UserApiGetUserByNameRequest, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).getUserByName(requestParameters.username, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -2077,7 +2077,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public loginUser(requestParameters: UserApiLoginUserRequest, options?: any) {
|
||||
public loginUser(requestParameters: UserApiLoginUserRequest, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).loginUser(requestParameters.username, requestParameters.password, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -2088,7 +2088,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public logoutUser(options?: any) {
|
||||
public logoutUser(options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
@ -2100,7 +2100,7 @@ export class UserApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApi
|
||||
*/
|
||||
public updateUser(requestParameters: UserApiUpdateUserRequest, options?: any) {
|
||||
public updateUser(requestParameters: UserApiUpdateUserRequest, options?: AxiosRequestConfig) {
|
||||
return UserApiFp(this.configuration).updateUser(requestParameters.username, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
import { Configuration } from "./configuration";
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
|
||||
export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
|
||||
|
||||
@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = {
|
||||
*/
|
||||
export interface RequestArgs {
|
||||
url: string;
|
||||
options: any;
|
||||
options: AxiosRequestConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user