forked from loafle/openapi-generator-original
[TypeScript] typescript-axios: Added possibility to add custom axios instance. (#1274)
* typescript-axios: Added possibility to add custom axios instance. This comes in handy if you want to use mocks in tests. * typescript-axios: aligned to fetch API for custom instance
This commit is contained in:
parent
111a3626b2
commit
51d2e4bd4c
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import * as url from "url";
|
import * as url from "url";
|
||||||
import { Configuration } from "./configuration";
|
import { Configuration } from "./configuration";
|
||||||
import axios, { AxiosPromise } from 'axios';
|
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||||
|
|
||||||
const BASE_PATH = "{{{basePath}}}".replace(/\/+$/, "");
|
const BASE_PATH = "{{{basePath}}}".replace(/\/+$/, "");
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ export interface RequestArgs {
|
|||||||
export class BaseAPI {
|
export class BaseAPI {
|
||||||
protected configuration: Configuration | undefined;
|
protected configuration: Configuration | undefined;
|
||||||
|
|
||||||
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH) {
|
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
||||||
if (configuration) {
|
if (configuration) {
|
||||||
this.configuration = configuration;
|
this.configuration = configuration;
|
||||||
this.basePath = configuration.basePath || this.basePath;
|
this.basePath = configuration.basePath || this.basePath;
|
||||||
@ -255,9 +255,9 @@ export const {{classname}}Fp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): (basePath?: string) => AxiosPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Response{{/returnType}}> {
|
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Response{{/returnType}}> {
|
||||||
const localVarAxiosArgs = {{classname}}AxiosParamCreator(configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options);
|
const localVarAxiosArgs = {{classname}}AxiosParamCreator(configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -271,7 +271,7 @@ export const {{classname}}Fp = function(configuration?: Configuration) {
|
|||||||
* {{&description}}{{/description}}
|
* {{&description}}{{/description}}
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export const {{classname}}Factory = function (configuration?: Configuration, basePath?: string) {
|
export const {{classname}}Factory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
return {
|
return {
|
||||||
{{#operation}}
|
{{#operation}}
|
||||||
/**
|
/**
|
||||||
@ -286,7 +286,7 @@ export const {{classname}}Factory = function (configuration?: Configuration, bas
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any) {
|
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any) {
|
||||||
return {{classname}}Fp(configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options)(basePath);
|
return {{classname}}Fp(configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options)(axios, basePath);
|
||||||
},
|
},
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
};
|
};
|
||||||
@ -346,7 +346,7 @@ export class {{classname}} extends BaseAPI {
|
|||||||
* @memberof {{classname}}
|
* @memberof {{classname}}
|
||||||
*/
|
*/
|
||||||
public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any) {
|
public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any) {
|
||||||
return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options)(this.basePath);
|
return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
|
@ -1 +1 @@
|
|||||||
3.2.3-SNAPSHOT
|
3.3.2-SNAPSHOT
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
import * as url from "url";
|
import * as url from "url";
|
||||||
import { Configuration } from "./configuration";
|
import { Configuration } from "./configuration";
|
||||||
import axios, { AxiosPromise } from 'axios';
|
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||||
|
|
||||||
const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
|
const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ export interface RequestArgs {
|
|||||||
export class BaseAPI {
|
export class BaseAPI {
|
||||||
protected configuration: Configuration | undefined;
|
protected configuration: Configuration | undefined;
|
||||||
|
|
||||||
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH) {
|
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
||||||
if (configuration) {
|
if (configuration) {
|
||||||
this.configuration = configuration;
|
this.configuration = configuration;
|
||||||
this.basePath = configuration.basePath || this.basePath;
|
this.basePath = configuration.basePath || this.basePath;
|
||||||
@ -714,9 +714,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
addPet(pet: Pet, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
addPet(pet: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).addPet(pet, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).addPet(pet, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -729,9 +729,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deletePet(petId: number, apiKey?: string, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
deletePet(petId: number, apiKey?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -743,9 +743,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): (basePath?: string) => AxiosPromise<Array<Pet>> {
|
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -757,9 +757,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
findPetsByTags(tags: Array<string>, options?: any): (basePath?: string) => AxiosPromise<Array<Pet>> {
|
findPetsByTags(tags: Array<string>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -771,9 +771,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getPetById(petId: number, options?: any): (basePath?: string) => AxiosPromise<Pet> {
|
getPetById(petId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -785,9 +785,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updatePet(pet: Pet, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
updatePet(pet: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePet(pet, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePet(pet, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -801,9 +801,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -817,9 +817,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): (basePath?: string) => AxiosPromise<ApiResponse> {
|
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -831,7 +831,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* PetApi - factory interface
|
* PetApi - factory interface
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export const PetApiFactory = function (configuration?: Configuration, basePath?: string) {
|
export const PetApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -841,7 +841,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
addPet(pet: Pet, options?: any) {
|
addPet(pet: Pet, options?: any) {
|
||||||
return PetApiFp(configuration).addPet(pet, options)(basePath);
|
return PetApiFp(configuration).addPet(pet, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -852,7 +852,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deletePet(petId: number, apiKey?: string, options?: any) {
|
deletePet(petId: number, apiKey?: string, options?: any) {
|
||||||
return PetApiFp(configuration).deletePet(petId, apiKey, options)(basePath);
|
return PetApiFp(configuration).deletePet(petId, apiKey, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Multiple status values can be provided with comma separated strings
|
* Multiple status values can be provided with comma separated strings
|
||||||
@ -862,7 +862,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||||
return PetApiFp(configuration).findPetsByStatus(status, options)(basePath);
|
return PetApiFp(configuration).findPetsByStatus(status, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
@ -872,7 +872,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
findPetsByTags(tags: Array<string>, options?: any) {
|
findPetsByTags(tags: Array<string>, options?: any) {
|
||||||
return PetApiFp(configuration).findPetsByTags(tags, options)(basePath);
|
return PetApiFp(configuration).findPetsByTags(tags, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Returns a single pet
|
* Returns a single pet
|
||||||
@ -882,7 +882,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getPetById(petId: number, options?: any) {
|
getPetById(petId: number, options?: any) {
|
||||||
return PetApiFp(configuration).getPetById(petId, options)(basePath);
|
return PetApiFp(configuration).getPetById(petId, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -892,7 +892,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updatePet(pet: Pet, options?: any) {
|
updatePet(pet: Pet, options?: any) {
|
||||||
return PetApiFp(configuration).updatePet(pet, options)(basePath);
|
return PetApiFp(configuration).updatePet(pet, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -904,7 +904,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||||
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options)(basePath);
|
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -916,7 +916,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||||
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options)(basePath);
|
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -937,7 +937,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public addPet(pet: Pet, options?: any) {
|
public addPet(pet: Pet, options?: any) {
|
||||||
return PetApiFp(this.configuration).addPet(pet, options)(this.basePath);
|
return PetApiFp(this.configuration).addPet(pet, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -950,7 +950,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public deletePet(petId: number, apiKey?: string, options?: any) {
|
public deletePet(petId: number, apiKey?: string, options?: any) {
|
||||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options)(this.basePath);
|
return PetApiFp(this.configuration).deletePet(petId, apiKey, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -962,7 +962,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||||
return PetApiFp(this.configuration).findPetsByStatus(status, options)(this.basePath);
|
return PetApiFp(this.configuration).findPetsByStatus(status, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -974,7 +974,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public findPetsByTags(tags: Array<string>, options?: any) {
|
public findPetsByTags(tags: Array<string>, options?: any) {
|
||||||
return PetApiFp(this.configuration).findPetsByTags(tags, options)(this.basePath);
|
return PetApiFp(this.configuration).findPetsByTags(tags, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -986,7 +986,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public getPetById(petId: number, options?: any) {
|
public getPetById(petId: number, options?: any) {
|
||||||
return PetApiFp(this.configuration).getPetById(petId, options)(this.basePath);
|
return PetApiFp(this.configuration).getPetById(petId, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -998,7 +998,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public updatePet(pet: Pet, options?: any) {
|
public updatePet(pet: Pet, options?: any) {
|
||||||
return PetApiFp(this.configuration).updatePet(pet, options)(this.basePath);
|
return PetApiFp(this.configuration).updatePet(pet, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1012,7 +1012,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options)(this.basePath);
|
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1026,7 +1026,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options)(this.basePath);
|
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1190,9 +1190,9 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deleteOrder(orderId: string, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
deleteOrder(orderId: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1203,9 +1203,9 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getInventory(options?: any): (basePath?: string) => AxiosPromise<{ [key: string]: number; }> {
|
getInventory(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }> {
|
||||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getInventory(options);
|
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getInventory(options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1217,9 +1217,9 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getOrderById(orderId: number, options?: any): (basePath?: string) => AxiosPromise<Order> {
|
getOrderById(orderId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1231,9 +1231,9 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
placeOrder(order: Order, options?: any): (basePath?: string) => AxiosPromise<Order> {
|
placeOrder(order: Order, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).placeOrder(order, options);
|
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).placeOrder(order, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1245,7 +1245,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* StoreApi - factory interface
|
* StoreApi - factory interface
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export const StoreApiFactory = function (configuration?: Configuration, basePath?: string) {
|
export const StoreApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
@ -1255,7 +1255,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deleteOrder(orderId: string, options?: any) {
|
deleteOrder(orderId: string, options?: any) {
|
||||||
return StoreApiFp(configuration).deleteOrder(orderId, options)(basePath);
|
return StoreApiFp(configuration).deleteOrder(orderId, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Returns a map of status codes to quantities
|
* Returns a map of status codes to quantities
|
||||||
@ -1264,7 +1264,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getInventory(options?: any) {
|
getInventory(options?: any) {
|
||||||
return StoreApiFp(configuration).getInventory(options)(basePath);
|
return StoreApiFp(configuration).getInventory(options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
@ -1274,7 +1274,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getOrderById(orderId: number, options?: any) {
|
getOrderById(orderId: number, options?: any) {
|
||||||
return StoreApiFp(configuration).getOrderById(orderId, options)(basePath);
|
return StoreApiFp(configuration).getOrderById(orderId, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1284,7 +1284,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
placeOrder(order: Order, options?: any) {
|
placeOrder(order: Order, options?: any) {
|
||||||
return StoreApiFp(configuration).placeOrder(order, options)(basePath);
|
return StoreApiFp(configuration).placeOrder(order, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -1305,7 +1305,7 @@ export class StoreApi extends BaseAPI {
|
|||||||
* @memberof StoreApi
|
* @memberof StoreApi
|
||||||
*/
|
*/
|
||||||
public deleteOrder(orderId: string, options?: any) {
|
public deleteOrder(orderId: string, options?: any) {
|
||||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options)(this.basePath);
|
return StoreApiFp(this.configuration).deleteOrder(orderId, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1316,7 +1316,7 @@ export class StoreApi extends BaseAPI {
|
|||||||
* @memberof StoreApi
|
* @memberof StoreApi
|
||||||
*/
|
*/
|
||||||
public getInventory(options?: any) {
|
public getInventory(options?: any) {
|
||||||
return StoreApiFp(this.configuration).getInventory(options)(this.basePath);
|
return StoreApiFp(this.configuration).getInventory(options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1328,7 +1328,7 @@ export class StoreApi extends BaseAPI {
|
|||||||
* @memberof StoreApi
|
* @memberof StoreApi
|
||||||
*/
|
*/
|
||||||
public getOrderById(orderId: number, options?: any) {
|
public getOrderById(orderId: number, options?: any) {
|
||||||
return StoreApiFp(this.configuration).getOrderById(orderId, options)(this.basePath);
|
return StoreApiFp(this.configuration).getOrderById(orderId, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1340,7 +1340,7 @@ export class StoreApi extends BaseAPI {
|
|||||||
* @memberof StoreApi
|
* @memberof StoreApi
|
||||||
*/
|
*/
|
||||||
public placeOrder(order: Order, options?: any) {
|
public placeOrder(order: Order, options?: any) {
|
||||||
return StoreApiFp(this.configuration).placeOrder(order, options)(this.basePath);
|
return StoreApiFp(this.configuration).placeOrder(order, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1655,9 +1655,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUser(user: User, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
createUser(user: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUser(user, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUser(user, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1669,9 +1669,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUsersWithArrayInput(user: Array<User>, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
createUsersWithArrayInput(user: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(user, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(user, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1683,9 +1683,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUsersWithListInput(user: Array<User>, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
createUsersWithListInput(user: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithListInput(user, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithListInput(user, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1697,9 +1697,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deleteUser(username: string, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
deleteUser(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1711,9 +1711,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getUserByName(username: string, options?: any): (basePath?: string) => AxiosPromise<User> {
|
getUserByName(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<User> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1726,9 +1726,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
loginUser(username: string, password: string, options?: any): (basePath?: string) => AxiosPromise<string> {
|
loginUser(username: string, password: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<string> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1739,9 +1739,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
logoutUser(options?: any): (basePath?: string) => AxiosPromise<Response> {
|
logoutUser(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).logoutUser(options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).logoutUser(options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1754,9 +1754,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updateUser(username: string, user: User, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
updateUser(username: string, user: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).updateUser(username, user, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).updateUser(username, user, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1768,7 +1768,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* UserApi - factory interface
|
* UserApi - factory interface
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export const UserApiFactory = function (configuration?: Configuration, basePath?: string) {
|
export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -1778,7 +1778,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUser(user: User, options?: any) {
|
createUser(user: User, options?: any) {
|
||||||
return UserApiFp(configuration).createUser(user, options)(basePath);
|
return UserApiFp(configuration).createUser(user, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1788,7 +1788,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUsersWithArrayInput(user: Array<User>, options?: any) {
|
createUsersWithArrayInput(user: Array<User>, options?: any) {
|
||||||
return UserApiFp(configuration).createUsersWithArrayInput(user, options)(basePath);
|
return UserApiFp(configuration).createUsersWithArrayInput(user, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1798,7 +1798,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUsersWithListInput(user: Array<User>, options?: any) {
|
createUsersWithListInput(user: Array<User>, options?: any) {
|
||||||
return UserApiFp(configuration).createUsersWithListInput(user, options)(basePath);
|
return UserApiFp(configuration).createUsersWithListInput(user, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -1808,7 +1808,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deleteUser(username: string, options?: any) {
|
deleteUser(username: string, options?: any) {
|
||||||
return UserApiFp(configuration).deleteUser(username, options)(basePath);
|
return UserApiFp(configuration).deleteUser(username, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1818,7 +1818,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getUserByName(username: string, options?: any) {
|
getUserByName(username: string, options?: any) {
|
||||||
return UserApiFp(configuration).getUserByName(username, options)(basePath);
|
return UserApiFp(configuration).getUserByName(username, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1829,7 +1829,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
loginUser(username: string, password: string, options?: any) {
|
loginUser(username: string, password: string, options?: any) {
|
||||||
return UserApiFp(configuration).loginUser(username, password, options)(basePath);
|
return UserApiFp(configuration).loginUser(username, password, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1838,7 +1838,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
logoutUser(options?: any) {
|
logoutUser(options?: any) {
|
||||||
return UserApiFp(configuration).logoutUser(options)(basePath);
|
return UserApiFp(configuration).logoutUser(options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -1849,7 +1849,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updateUser(username: string, user: User, options?: any) {
|
updateUser(username: string, user: User, options?: any) {
|
||||||
return UserApiFp(configuration).updateUser(username, user, options)(basePath);
|
return UserApiFp(configuration).updateUser(username, user, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -1870,7 +1870,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public createUser(user: User, options?: any) {
|
public createUser(user: User, options?: any) {
|
||||||
return UserApiFp(this.configuration).createUser(user, options)(this.basePath);
|
return UserApiFp(this.configuration).createUser(user, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1882,7 +1882,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public createUsersWithArrayInput(user: Array<User>, options?: any) {
|
public createUsersWithArrayInput(user: Array<User>, options?: any) {
|
||||||
return UserApiFp(this.configuration).createUsersWithArrayInput(user, options)(this.basePath);
|
return UserApiFp(this.configuration).createUsersWithArrayInput(user, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1894,7 +1894,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public createUsersWithListInput(user: Array<User>, options?: any) {
|
public createUsersWithListInput(user: Array<User>, options?: any) {
|
||||||
return UserApiFp(this.configuration).createUsersWithListInput(user, options)(this.basePath);
|
return UserApiFp(this.configuration).createUsersWithListInput(user, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1906,7 +1906,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public deleteUser(username: string, options?: any) {
|
public deleteUser(username: string, options?: any) {
|
||||||
return UserApiFp(this.configuration).deleteUser(username, options)(this.basePath);
|
return UserApiFp(this.configuration).deleteUser(username, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1918,7 +1918,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public getUserByName(username: string, options?: any) {
|
public getUserByName(username: string, options?: any) {
|
||||||
return UserApiFp(this.configuration).getUserByName(username, options)(this.basePath);
|
return UserApiFp(this.configuration).getUserByName(username, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1931,7 +1931,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public loginUser(username: string, password: string, options?: any) {
|
public loginUser(username: string, password: string, options?: any) {
|
||||||
return UserApiFp(this.configuration).loginUser(username, password, options)(this.basePath);
|
return UserApiFp(this.configuration).loginUser(username, password, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1942,7 +1942,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public logoutUser(options?: any) {
|
public logoutUser(options?: any) {
|
||||||
return UserApiFp(this.configuration).logoutUser(options)(this.basePath);
|
return UserApiFp(this.configuration).logoutUser(options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1955,7 +1955,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public updateUser(username: string, user: User, options?: any) {
|
public updateUser(username: string, user: User, options?: any) {
|
||||||
return UserApiFp(this.configuration).updateUser(username, user, options)(this.basePath);
|
return UserApiFp(this.configuration).updateUser(username, user, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
3.2.3-SNAPSHOT
|
3.3.2-SNAPSHOT
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
import * as url from "url";
|
import * as url from "url";
|
||||||
import { Configuration } from "./configuration";
|
import { Configuration } from "./configuration";
|
||||||
import axios, { AxiosPromise } from 'axios';
|
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||||
|
|
||||||
const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
|
const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ export interface RequestArgs {
|
|||||||
export class BaseAPI {
|
export class BaseAPI {
|
||||||
protected configuration: Configuration | undefined;
|
protected configuration: Configuration | undefined;
|
||||||
|
|
||||||
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH) {
|
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
||||||
if (configuration) {
|
if (configuration) {
|
||||||
this.configuration = configuration;
|
this.configuration = configuration;
|
||||||
this.basePath = configuration.basePath || this.basePath;
|
this.basePath = configuration.basePath || this.basePath;
|
||||||
@ -714,9 +714,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
addPet(pet: Pet, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
addPet(pet: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).addPet(pet, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).addPet(pet, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -729,9 +729,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deletePet(petId: number, apiKey?: string, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
deletePet(petId: number, apiKey?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -743,9 +743,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): (basePath?: string) => AxiosPromise<Array<Pet>> {
|
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -757,9 +757,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
findPetsByTags(tags: Array<string>, options?: any): (basePath?: string) => AxiosPromise<Array<Pet>> {
|
findPetsByTags(tags: Array<string>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -771,9 +771,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getPetById(petId: number, options?: any): (basePath?: string) => AxiosPromise<Pet> {
|
getPetById(petId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -785,9 +785,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updatePet(pet: Pet, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
updatePet(pet: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePet(pet, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePet(pet, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -801,9 +801,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -817,9 +817,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): (basePath?: string) => AxiosPromise<ApiResponse> {
|
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -831,7 +831,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* PetApi - factory interface
|
* PetApi - factory interface
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export const PetApiFactory = function (configuration?: Configuration, basePath?: string) {
|
export const PetApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -841,7 +841,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
addPet(pet: Pet, options?: any) {
|
addPet(pet: Pet, options?: any) {
|
||||||
return PetApiFp(configuration).addPet(pet, options)(basePath);
|
return PetApiFp(configuration).addPet(pet, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -852,7 +852,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deletePet(petId: number, apiKey?: string, options?: any) {
|
deletePet(petId: number, apiKey?: string, options?: any) {
|
||||||
return PetApiFp(configuration).deletePet(petId, apiKey, options)(basePath);
|
return PetApiFp(configuration).deletePet(petId, apiKey, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Multiple status values can be provided with comma separated strings
|
* Multiple status values can be provided with comma separated strings
|
||||||
@ -862,7 +862,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||||
return PetApiFp(configuration).findPetsByStatus(status, options)(basePath);
|
return PetApiFp(configuration).findPetsByStatus(status, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
@ -872,7 +872,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
findPetsByTags(tags: Array<string>, options?: any) {
|
findPetsByTags(tags: Array<string>, options?: any) {
|
||||||
return PetApiFp(configuration).findPetsByTags(tags, options)(basePath);
|
return PetApiFp(configuration).findPetsByTags(tags, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Returns a single pet
|
* Returns a single pet
|
||||||
@ -882,7 +882,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getPetById(petId: number, options?: any) {
|
getPetById(petId: number, options?: any) {
|
||||||
return PetApiFp(configuration).getPetById(petId, options)(basePath);
|
return PetApiFp(configuration).getPetById(petId, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -892,7 +892,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updatePet(pet: Pet, options?: any) {
|
updatePet(pet: Pet, options?: any) {
|
||||||
return PetApiFp(configuration).updatePet(pet, options)(basePath);
|
return PetApiFp(configuration).updatePet(pet, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -904,7 +904,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||||
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options)(basePath);
|
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -916,7 +916,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||||
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options)(basePath);
|
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -937,7 +937,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public addPet(pet: Pet, options?: any) {
|
public addPet(pet: Pet, options?: any) {
|
||||||
return PetApiFp(this.configuration).addPet(pet, options)(this.basePath);
|
return PetApiFp(this.configuration).addPet(pet, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -950,7 +950,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public deletePet(petId: number, apiKey?: string, options?: any) {
|
public deletePet(petId: number, apiKey?: string, options?: any) {
|
||||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options)(this.basePath);
|
return PetApiFp(this.configuration).deletePet(petId, apiKey, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -962,7 +962,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||||
return PetApiFp(this.configuration).findPetsByStatus(status, options)(this.basePath);
|
return PetApiFp(this.configuration).findPetsByStatus(status, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -974,7 +974,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public findPetsByTags(tags: Array<string>, options?: any) {
|
public findPetsByTags(tags: Array<string>, options?: any) {
|
||||||
return PetApiFp(this.configuration).findPetsByTags(tags, options)(this.basePath);
|
return PetApiFp(this.configuration).findPetsByTags(tags, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -986,7 +986,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public getPetById(petId: number, options?: any) {
|
public getPetById(petId: number, options?: any) {
|
||||||
return PetApiFp(this.configuration).getPetById(petId, options)(this.basePath);
|
return PetApiFp(this.configuration).getPetById(petId, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -998,7 +998,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public updatePet(pet: Pet, options?: any) {
|
public updatePet(pet: Pet, options?: any) {
|
||||||
return PetApiFp(this.configuration).updatePet(pet, options)(this.basePath);
|
return PetApiFp(this.configuration).updatePet(pet, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1012,7 +1012,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options)(this.basePath);
|
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1026,7 +1026,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options)(this.basePath);
|
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1190,9 +1190,9 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deleteOrder(orderId: string, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
deleteOrder(orderId: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1203,9 +1203,9 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getInventory(options?: any): (basePath?: string) => AxiosPromise<{ [key: string]: number; }> {
|
getInventory(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }> {
|
||||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getInventory(options);
|
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getInventory(options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1217,9 +1217,9 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getOrderById(orderId: number, options?: any): (basePath?: string) => AxiosPromise<Order> {
|
getOrderById(orderId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1231,9 +1231,9 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
placeOrder(order: Order, options?: any): (basePath?: string) => AxiosPromise<Order> {
|
placeOrder(order: Order, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).placeOrder(order, options);
|
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).placeOrder(order, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1245,7 +1245,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* StoreApi - factory interface
|
* StoreApi - factory interface
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export const StoreApiFactory = function (configuration?: Configuration, basePath?: string) {
|
export const StoreApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
@ -1255,7 +1255,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deleteOrder(orderId: string, options?: any) {
|
deleteOrder(orderId: string, options?: any) {
|
||||||
return StoreApiFp(configuration).deleteOrder(orderId, options)(basePath);
|
return StoreApiFp(configuration).deleteOrder(orderId, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Returns a map of status codes to quantities
|
* Returns a map of status codes to quantities
|
||||||
@ -1264,7 +1264,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getInventory(options?: any) {
|
getInventory(options?: any) {
|
||||||
return StoreApiFp(configuration).getInventory(options)(basePath);
|
return StoreApiFp(configuration).getInventory(options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
@ -1274,7 +1274,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getOrderById(orderId: number, options?: any) {
|
getOrderById(orderId: number, options?: any) {
|
||||||
return StoreApiFp(configuration).getOrderById(orderId, options)(basePath);
|
return StoreApiFp(configuration).getOrderById(orderId, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1284,7 +1284,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
placeOrder(order: Order, options?: any) {
|
placeOrder(order: Order, options?: any) {
|
||||||
return StoreApiFp(configuration).placeOrder(order, options)(basePath);
|
return StoreApiFp(configuration).placeOrder(order, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -1305,7 +1305,7 @@ export class StoreApi extends BaseAPI {
|
|||||||
* @memberof StoreApi
|
* @memberof StoreApi
|
||||||
*/
|
*/
|
||||||
public deleteOrder(orderId: string, options?: any) {
|
public deleteOrder(orderId: string, options?: any) {
|
||||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options)(this.basePath);
|
return StoreApiFp(this.configuration).deleteOrder(orderId, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1316,7 +1316,7 @@ export class StoreApi extends BaseAPI {
|
|||||||
* @memberof StoreApi
|
* @memberof StoreApi
|
||||||
*/
|
*/
|
||||||
public getInventory(options?: any) {
|
public getInventory(options?: any) {
|
||||||
return StoreApiFp(this.configuration).getInventory(options)(this.basePath);
|
return StoreApiFp(this.configuration).getInventory(options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1328,7 +1328,7 @@ export class StoreApi extends BaseAPI {
|
|||||||
* @memberof StoreApi
|
* @memberof StoreApi
|
||||||
*/
|
*/
|
||||||
public getOrderById(orderId: number, options?: any) {
|
public getOrderById(orderId: number, options?: any) {
|
||||||
return StoreApiFp(this.configuration).getOrderById(orderId, options)(this.basePath);
|
return StoreApiFp(this.configuration).getOrderById(orderId, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1340,7 +1340,7 @@ export class StoreApi extends BaseAPI {
|
|||||||
* @memberof StoreApi
|
* @memberof StoreApi
|
||||||
*/
|
*/
|
||||||
public placeOrder(order: Order, options?: any) {
|
public placeOrder(order: Order, options?: any) {
|
||||||
return StoreApiFp(this.configuration).placeOrder(order, options)(this.basePath);
|
return StoreApiFp(this.configuration).placeOrder(order, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1655,9 +1655,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUser(user: User, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
createUser(user: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUser(user, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUser(user, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1669,9 +1669,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUsersWithArrayInput(user: Array<User>, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
createUsersWithArrayInput(user: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(user, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(user, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1683,9 +1683,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUsersWithListInput(user: Array<User>, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
createUsersWithListInput(user: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithListInput(user, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithListInput(user, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1697,9 +1697,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deleteUser(username: string, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
deleteUser(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1711,9 +1711,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getUserByName(username: string, options?: any): (basePath?: string) => AxiosPromise<User> {
|
getUserByName(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<User> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1726,9 +1726,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
loginUser(username: string, password: string, options?: any): (basePath?: string) => AxiosPromise<string> {
|
loginUser(username: string, password: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<string> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1739,9 +1739,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
logoutUser(options?: any): (basePath?: string) => AxiosPromise<Response> {
|
logoutUser(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).logoutUser(options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).logoutUser(options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1754,9 +1754,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updateUser(username: string, user: User, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
updateUser(username: string, user: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).updateUser(username, user, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).updateUser(username, user, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1768,7 +1768,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* UserApi - factory interface
|
* UserApi - factory interface
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export const UserApiFactory = function (configuration?: Configuration, basePath?: string) {
|
export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -1778,7 +1778,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUser(user: User, options?: any) {
|
createUser(user: User, options?: any) {
|
||||||
return UserApiFp(configuration).createUser(user, options)(basePath);
|
return UserApiFp(configuration).createUser(user, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1788,7 +1788,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUsersWithArrayInput(user: Array<User>, options?: any) {
|
createUsersWithArrayInput(user: Array<User>, options?: any) {
|
||||||
return UserApiFp(configuration).createUsersWithArrayInput(user, options)(basePath);
|
return UserApiFp(configuration).createUsersWithArrayInput(user, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1798,7 +1798,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUsersWithListInput(user: Array<User>, options?: any) {
|
createUsersWithListInput(user: Array<User>, options?: any) {
|
||||||
return UserApiFp(configuration).createUsersWithListInput(user, options)(basePath);
|
return UserApiFp(configuration).createUsersWithListInput(user, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -1808,7 +1808,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deleteUser(username: string, options?: any) {
|
deleteUser(username: string, options?: any) {
|
||||||
return UserApiFp(configuration).deleteUser(username, options)(basePath);
|
return UserApiFp(configuration).deleteUser(username, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1818,7 +1818,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getUserByName(username: string, options?: any) {
|
getUserByName(username: string, options?: any) {
|
||||||
return UserApiFp(configuration).getUserByName(username, options)(basePath);
|
return UserApiFp(configuration).getUserByName(username, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1829,7 +1829,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
loginUser(username: string, password: string, options?: any) {
|
loginUser(username: string, password: string, options?: any) {
|
||||||
return UserApiFp(configuration).loginUser(username, password, options)(basePath);
|
return UserApiFp(configuration).loginUser(username, password, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1838,7 +1838,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
logoutUser(options?: any) {
|
logoutUser(options?: any) {
|
||||||
return UserApiFp(configuration).logoutUser(options)(basePath);
|
return UserApiFp(configuration).logoutUser(options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -1849,7 +1849,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updateUser(username: string, user: User, options?: any) {
|
updateUser(username: string, user: User, options?: any) {
|
||||||
return UserApiFp(configuration).updateUser(username, user, options)(basePath);
|
return UserApiFp(configuration).updateUser(username, user, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -1870,7 +1870,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public createUser(user: User, options?: any) {
|
public createUser(user: User, options?: any) {
|
||||||
return UserApiFp(this.configuration).createUser(user, options)(this.basePath);
|
return UserApiFp(this.configuration).createUser(user, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1882,7 +1882,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public createUsersWithArrayInput(user: Array<User>, options?: any) {
|
public createUsersWithArrayInput(user: Array<User>, options?: any) {
|
||||||
return UserApiFp(this.configuration).createUsersWithArrayInput(user, options)(this.basePath);
|
return UserApiFp(this.configuration).createUsersWithArrayInput(user, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1894,7 +1894,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public createUsersWithListInput(user: Array<User>, options?: any) {
|
public createUsersWithListInput(user: Array<User>, options?: any) {
|
||||||
return UserApiFp(this.configuration).createUsersWithListInput(user, options)(this.basePath);
|
return UserApiFp(this.configuration).createUsersWithListInput(user, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1906,7 +1906,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public deleteUser(username: string, options?: any) {
|
public deleteUser(username: string, options?: any) {
|
||||||
return UserApiFp(this.configuration).deleteUser(username, options)(this.basePath);
|
return UserApiFp(this.configuration).deleteUser(username, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1918,7 +1918,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public getUserByName(username: string, options?: any) {
|
public getUserByName(username: string, options?: any) {
|
||||||
return UserApiFp(this.configuration).getUserByName(username, options)(this.basePath);
|
return UserApiFp(this.configuration).getUserByName(username, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1931,7 +1931,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public loginUser(username: string, password: string, options?: any) {
|
public loginUser(username: string, password: string, options?: any) {
|
||||||
return UserApiFp(this.configuration).loginUser(username, password, options)(this.basePath);
|
return UserApiFp(this.configuration).loginUser(username, password, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1942,7 +1942,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public logoutUser(options?: any) {
|
public logoutUser(options?: any) {
|
||||||
return UserApiFp(this.configuration).logoutUser(options)(this.basePath);
|
return UserApiFp(this.configuration).logoutUser(options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1955,7 +1955,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public updateUser(username: string, user: User, options?: any) {
|
public updateUser(username: string, user: User, options?: any) {
|
||||||
return UserApiFp(this.configuration).updateUser(username, user, options)(this.basePath);
|
return UserApiFp(this.configuration).updateUser(username, user, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
3.2.3-SNAPSHOT
|
3.3.2-SNAPSHOT
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
import * as url from "url";
|
import * as url from "url";
|
||||||
import { Configuration } from "./configuration";
|
import { Configuration } from "./configuration";
|
||||||
import axios, { AxiosPromise } from 'axios';
|
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||||
|
|
||||||
const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
|
const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ export interface RequestArgs {
|
|||||||
export class BaseAPI {
|
export class BaseAPI {
|
||||||
protected configuration: Configuration | undefined;
|
protected configuration: Configuration | undefined;
|
||||||
|
|
||||||
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH) {
|
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
||||||
if (configuration) {
|
if (configuration) {
|
||||||
this.configuration = configuration;
|
this.configuration = configuration;
|
||||||
this.basePath = configuration.basePath || this.basePath;
|
this.basePath = configuration.basePath || this.basePath;
|
||||||
@ -714,9 +714,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
addPet(pet: Pet, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
addPet(pet: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).addPet(pet, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).addPet(pet, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -729,9 +729,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deletePet(petId: number, apiKey?: string, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
deletePet(petId: number, apiKey?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -743,9 +743,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): (basePath?: string) => AxiosPromise<Array<Pet>> {
|
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -757,9 +757,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
findPetsByTags(tags: Array<string>, options?: any): (basePath?: string) => AxiosPromise<Array<Pet>> {
|
findPetsByTags(tags: Array<string>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -771,9 +771,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getPetById(petId: number, options?: any): (basePath?: string) => AxiosPromise<Pet> {
|
getPetById(petId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -785,9 +785,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updatePet(pet: Pet, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
updatePet(pet: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePet(pet, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePet(pet, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -801,9 +801,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -817,9 +817,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): (basePath?: string) => AxiosPromise<ApiResponse> {
|
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -831,7 +831,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* PetApi - factory interface
|
* PetApi - factory interface
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export const PetApiFactory = function (configuration?: Configuration, basePath?: string) {
|
export const PetApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -841,7 +841,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
addPet(pet: Pet, options?: any) {
|
addPet(pet: Pet, options?: any) {
|
||||||
return PetApiFp(configuration).addPet(pet, options)(basePath);
|
return PetApiFp(configuration).addPet(pet, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -852,7 +852,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deletePet(petId: number, apiKey?: string, options?: any) {
|
deletePet(petId: number, apiKey?: string, options?: any) {
|
||||||
return PetApiFp(configuration).deletePet(petId, apiKey, options)(basePath);
|
return PetApiFp(configuration).deletePet(petId, apiKey, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Multiple status values can be provided with comma separated strings
|
* Multiple status values can be provided with comma separated strings
|
||||||
@ -862,7 +862,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||||
return PetApiFp(configuration).findPetsByStatus(status, options)(basePath);
|
return PetApiFp(configuration).findPetsByStatus(status, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
@ -872,7 +872,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
findPetsByTags(tags: Array<string>, options?: any) {
|
findPetsByTags(tags: Array<string>, options?: any) {
|
||||||
return PetApiFp(configuration).findPetsByTags(tags, options)(basePath);
|
return PetApiFp(configuration).findPetsByTags(tags, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Returns a single pet
|
* Returns a single pet
|
||||||
@ -882,7 +882,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getPetById(petId: number, options?: any) {
|
getPetById(petId: number, options?: any) {
|
||||||
return PetApiFp(configuration).getPetById(petId, options)(basePath);
|
return PetApiFp(configuration).getPetById(petId, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -892,7 +892,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updatePet(pet: Pet, options?: any) {
|
updatePet(pet: Pet, options?: any) {
|
||||||
return PetApiFp(configuration).updatePet(pet, options)(basePath);
|
return PetApiFp(configuration).updatePet(pet, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -904,7 +904,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||||
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options)(basePath);
|
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -916,7 +916,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||||
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options)(basePath);
|
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -1030,7 +1030,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public addPet(pet: Pet, options?: any) {
|
public addPet(pet: Pet, options?: any) {
|
||||||
return PetApiFp(this.configuration).addPet(pet, options)(this.basePath);
|
return PetApiFp(this.configuration).addPet(pet, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1043,7 +1043,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public deletePet(petId: number, apiKey?: string, options?: any) {
|
public deletePet(petId: number, apiKey?: string, options?: any) {
|
||||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options)(this.basePath);
|
return PetApiFp(this.configuration).deletePet(petId, apiKey, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1055,7 +1055,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||||
return PetApiFp(this.configuration).findPetsByStatus(status, options)(this.basePath);
|
return PetApiFp(this.configuration).findPetsByStatus(status, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1067,7 +1067,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public findPetsByTags(tags: Array<string>, options?: any) {
|
public findPetsByTags(tags: Array<string>, options?: any) {
|
||||||
return PetApiFp(this.configuration).findPetsByTags(tags, options)(this.basePath);
|
return PetApiFp(this.configuration).findPetsByTags(tags, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1079,7 +1079,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public getPetById(petId: number, options?: any) {
|
public getPetById(petId: number, options?: any) {
|
||||||
return PetApiFp(this.configuration).getPetById(petId, options)(this.basePath);
|
return PetApiFp(this.configuration).getPetById(petId, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1091,7 +1091,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public updatePet(pet: Pet, options?: any) {
|
public updatePet(pet: Pet, options?: any) {
|
||||||
return PetApiFp(this.configuration).updatePet(pet, options)(this.basePath);
|
return PetApiFp(this.configuration).updatePet(pet, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1105,7 +1105,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options)(this.basePath);
|
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1119,7 +1119,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options)(this.basePath);
|
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1283,9 +1283,9 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deleteOrder(orderId: string, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
deleteOrder(orderId: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1296,9 +1296,9 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getInventory(options?: any): (basePath?: string) => AxiosPromise<{ [key: string]: number; }> {
|
getInventory(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }> {
|
||||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getInventory(options);
|
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getInventory(options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1310,9 +1310,9 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getOrderById(orderId: number, options?: any): (basePath?: string) => AxiosPromise<Order> {
|
getOrderById(orderId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1324,9 +1324,9 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
placeOrder(order: Order, options?: any): (basePath?: string) => AxiosPromise<Order> {
|
placeOrder(order: Order, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).placeOrder(order, options);
|
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).placeOrder(order, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1338,7 +1338,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* StoreApi - factory interface
|
* StoreApi - factory interface
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export const StoreApiFactory = function (configuration?: Configuration, basePath?: string) {
|
export const StoreApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
@ -1348,7 +1348,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deleteOrder(orderId: string, options?: any) {
|
deleteOrder(orderId: string, options?: any) {
|
||||||
return StoreApiFp(configuration).deleteOrder(orderId, options)(basePath);
|
return StoreApiFp(configuration).deleteOrder(orderId, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Returns a map of status codes to quantities
|
* Returns a map of status codes to quantities
|
||||||
@ -1357,7 +1357,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getInventory(options?: any) {
|
getInventory(options?: any) {
|
||||||
return StoreApiFp(configuration).getInventory(options)(basePath);
|
return StoreApiFp(configuration).getInventory(options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
@ -1367,7 +1367,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getOrderById(orderId: number, options?: any) {
|
getOrderById(orderId: number, options?: any) {
|
||||||
return StoreApiFp(configuration).getOrderById(orderId, options)(basePath);
|
return StoreApiFp(configuration).getOrderById(orderId, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1377,7 +1377,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
placeOrder(order: Order, options?: any) {
|
placeOrder(order: Order, options?: any) {
|
||||||
return StoreApiFp(configuration).placeOrder(order, options)(basePath);
|
return StoreApiFp(configuration).placeOrder(order, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -1445,7 +1445,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface {
|
|||||||
* @memberof StoreApi
|
* @memberof StoreApi
|
||||||
*/
|
*/
|
||||||
public deleteOrder(orderId: string, options?: any) {
|
public deleteOrder(orderId: string, options?: any) {
|
||||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options)(this.basePath);
|
return StoreApiFp(this.configuration).deleteOrder(orderId, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1456,7 +1456,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface {
|
|||||||
* @memberof StoreApi
|
* @memberof StoreApi
|
||||||
*/
|
*/
|
||||||
public getInventory(options?: any) {
|
public getInventory(options?: any) {
|
||||||
return StoreApiFp(this.configuration).getInventory(options)(this.basePath);
|
return StoreApiFp(this.configuration).getInventory(options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1468,7 +1468,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface {
|
|||||||
* @memberof StoreApi
|
* @memberof StoreApi
|
||||||
*/
|
*/
|
||||||
public getOrderById(orderId: number, options?: any) {
|
public getOrderById(orderId: number, options?: any) {
|
||||||
return StoreApiFp(this.configuration).getOrderById(orderId, options)(this.basePath);
|
return StoreApiFp(this.configuration).getOrderById(orderId, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1480,7 +1480,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface {
|
|||||||
* @memberof StoreApi
|
* @memberof StoreApi
|
||||||
*/
|
*/
|
||||||
public placeOrder(order: Order, options?: any) {
|
public placeOrder(order: Order, options?: any) {
|
||||||
return StoreApiFp(this.configuration).placeOrder(order, options)(this.basePath);
|
return StoreApiFp(this.configuration).placeOrder(order, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1795,9 +1795,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUser(user: User, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
createUser(user: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUser(user, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUser(user, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1809,9 +1809,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUsersWithArrayInput(user: Array<User>, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
createUsersWithArrayInput(user: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(user, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(user, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1823,9 +1823,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUsersWithListInput(user: Array<User>, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
createUsersWithListInput(user: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithListInput(user, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithListInput(user, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1837,9 +1837,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deleteUser(username: string, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
deleteUser(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1851,9 +1851,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getUserByName(username: string, options?: any): (basePath?: string) => AxiosPromise<User> {
|
getUserByName(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<User> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1866,9 +1866,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
loginUser(username: string, password: string, options?: any): (basePath?: string) => AxiosPromise<string> {
|
loginUser(username: string, password: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<string> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1879,9 +1879,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
logoutUser(options?: any): (basePath?: string) => AxiosPromise<Response> {
|
logoutUser(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).logoutUser(options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).logoutUser(options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1894,9 +1894,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updateUser(username: string, user: User, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
updateUser(username: string, user: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).updateUser(username, user, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).updateUser(username, user, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1908,7 +1908,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* UserApi - factory interface
|
* UserApi - factory interface
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export const UserApiFactory = function (configuration?: Configuration, basePath?: string) {
|
export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -1918,7 +1918,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUser(user: User, options?: any) {
|
createUser(user: User, options?: any) {
|
||||||
return UserApiFp(configuration).createUser(user, options)(basePath);
|
return UserApiFp(configuration).createUser(user, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1928,7 +1928,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUsersWithArrayInput(user: Array<User>, options?: any) {
|
createUsersWithArrayInput(user: Array<User>, options?: any) {
|
||||||
return UserApiFp(configuration).createUsersWithArrayInput(user, options)(basePath);
|
return UserApiFp(configuration).createUsersWithArrayInput(user, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1938,7 +1938,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUsersWithListInput(user: Array<User>, options?: any) {
|
createUsersWithListInput(user: Array<User>, options?: any) {
|
||||||
return UserApiFp(configuration).createUsersWithListInput(user, options)(basePath);
|
return UserApiFp(configuration).createUsersWithListInput(user, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -1948,7 +1948,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deleteUser(username: string, options?: any) {
|
deleteUser(username: string, options?: any) {
|
||||||
return UserApiFp(configuration).deleteUser(username, options)(basePath);
|
return UserApiFp(configuration).deleteUser(username, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1958,7 +1958,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getUserByName(username: string, options?: any) {
|
getUserByName(username: string, options?: any) {
|
||||||
return UserApiFp(configuration).getUserByName(username, options)(basePath);
|
return UserApiFp(configuration).getUserByName(username, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1969,7 +1969,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
loginUser(username: string, password: string, options?: any) {
|
loginUser(username: string, password: string, options?: any) {
|
||||||
return UserApiFp(configuration).loginUser(username, password, options)(basePath);
|
return UserApiFp(configuration).loginUser(username, password, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1978,7 +1978,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
logoutUser(options?: any) {
|
logoutUser(options?: any) {
|
||||||
return UserApiFp(configuration).logoutUser(options)(basePath);
|
return UserApiFp(configuration).logoutUser(options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -1989,7 +1989,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updateUser(username: string, user: User, options?: any) {
|
updateUser(username: string, user: User, options?: any) {
|
||||||
return UserApiFp(configuration).updateUser(username, user, options)(basePath);
|
return UserApiFp(configuration).updateUser(username, user, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -2099,7 +2099,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public createUser(user: User, options?: any) {
|
public createUser(user: User, options?: any) {
|
||||||
return UserApiFp(this.configuration).createUser(user, options)(this.basePath);
|
return UserApiFp(this.configuration).createUser(user, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2111,7 +2111,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public createUsersWithArrayInput(user: Array<User>, options?: any) {
|
public createUsersWithArrayInput(user: Array<User>, options?: any) {
|
||||||
return UserApiFp(this.configuration).createUsersWithArrayInput(user, options)(this.basePath);
|
return UserApiFp(this.configuration).createUsersWithArrayInput(user, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2123,7 +2123,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public createUsersWithListInput(user: Array<User>, options?: any) {
|
public createUsersWithListInput(user: Array<User>, options?: any) {
|
||||||
return UserApiFp(this.configuration).createUsersWithListInput(user, options)(this.basePath);
|
return UserApiFp(this.configuration).createUsersWithListInput(user, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2135,7 +2135,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public deleteUser(username: string, options?: any) {
|
public deleteUser(username: string, options?: any) {
|
||||||
return UserApiFp(this.configuration).deleteUser(username, options)(this.basePath);
|
return UserApiFp(this.configuration).deleteUser(username, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2147,7 +2147,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public getUserByName(username: string, options?: any) {
|
public getUserByName(username: string, options?: any) {
|
||||||
return UserApiFp(this.configuration).getUserByName(username, options)(this.basePath);
|
return UserApiFp(this.configuration).getUserByName(username, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2160,7 +2160,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public loginUser(username: string, password: string, options?: any) {
|
public loginUser(username: string, password: string, options?: any) {
|
||||||
return UserApiFp(this.configuration).loginUser(username, password, options)(this.basePath);
|
return UserApiFp(this.configuration).loginUser(username, password, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2171,7 +2171,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public logoutUser(options?: any) {
|
public logoutUser(options?: any) {
|
||||||
return UserApiFp(this.configuration).logoutUser(options)(this.basePath);
|
return UserApiFp(this.configuration).logoutUser(options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2184,7 +2184,7 @@ export class UserApi extends BaseAPI implements UserApiInterface {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public updateUser(username: string, user: User, options?: any) {
|
public updateUser(username: string, user: User, options?: any) {
|
||||||
return UserApiFp(this.configuration).updateUser(username, user, options)(this.basePath);
|
return UserApiFp(this.configuration).updateUser(username, user, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
3.2.3-SNAPSHOT
|
3.3.2-SNAPSHOT
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
import * as url from "url";
|
import * as url from "url";
|
||||||
import { Configuration } from "./configuration";
|
import { Configuration } from "./configuration";
|
||||||
import axios, { AxiosPromise } from 'axios';
|
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
|
||||||
|
|
||||||
const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
|
const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ export interface RequestArgs {
|
|||||||
export class BaseAPI {
|
export class BaseAPI {
|
||||||
protected configuration: Configuration | undefined;
|
protected configuration: Configuration | undefined;
|
||||||
|
|
||||||
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH) {
|
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
||||||
if (configuration) {
|
if (configuration) {
|
||||||
this.configuration = configuration;
|
this.configuration = configuration;
|
||||||
this.basePath = configuration.basePath || this.basePath;
|
this.basePath = configuration.basePath || this.basePath;
|
||||||
@ -714,9 +714,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
addPet(pet: Pet, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
addPet(pet: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).addPet(pet, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).addPet(pet, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -729,9 +729,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deletePet(petId: number, apiKey?: string, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
deletePet(petId: number, apiKey?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -743,9 +743,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): (basePath?: string) => AxiosPromise<Array<Pet>> {
|
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -757,9 +757,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
findPetsByTags(tags: Array<string>, options?: any): (basePath?: string) => AxiosPromise<Array<Pet>> {
|
findPetsByTags(tags: Array<string>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -771,9 +771,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getPetById(petId: number, options?: any): (basePath?: string) => AxiosPromise<Pet> {
|
getPetById(petId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Pet> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).getPetById(petId, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -785,9 +785,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updatePet(pet: Pet, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
updatePet(pet: Pet, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePet(pet, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePet(pet, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -801,9 +801,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
updatePetWithForm(petId: number, name?: string, status?: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -817,9 +817,9 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): (basePath?: string) => AxiosPromise<ApiResponse> {
|
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiResponse> {
|
||||||
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
const localVarAxiosArgs = PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -831,7 +831,7 @@ export const PetApiFp = function(configuration?: Configuration) {
|
|||||||
* PetApi - factory interface
|
* PetApi - factory interface
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export const PetApiFactory = function (configuration?: Configuration, basePath?: string) {
|
export const PetApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -841,7 +841,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
addPet(pet: Pet, options?: any) {
|
addPet(pet: Pet, options?: any) {
|
||||||
return PetApiFp(configuration).addPet(pet, options)(basePath);
|
return PetApiFp(configuration).addPet(pet, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -852,7 +852,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deletePet(petId: number, apiKey?: string, options?: any) {
|
deletePet(petId: number, apiKey?: string, options?: any) {
|
||||||
return PetApiFp(configuration).deletePet(petId, apiKey, options)(basePath);
|
return PetApiFp(configuration).deletePet(petId, apiKey, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Multiple status values can be provided with comma separated strings
|
* Multiple status values can be provided with comma separated strings
|
||||||
@ -862,7 +862,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||||
return PetApiFp(configuration).findPetsByStatus(status, options)(basePath);
|
return PetApiFp(configuration).findPetsByStatus(status, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
@ -872,7 +872,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
findPetsByTags(tags: Array<string>, options?: any) {
|
findPetsByTags(tags: Array<string>, options?: any) {
|
||||||
return PetApiFp(configuration).findPetsByTags(tags, options)(basePath);
|
return PetApiFp(configuration).findPetsByTags(tags, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Returns a single pet
|
* Returns a single pet
|
||||||
@ -882,7 +882,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getPetById(petId: number, options?: any) {
|
getPetById(petId: number, options?: any) {
|
||||||
return PetApiFp(configuration).getPetById(petId, options)(basePath);
|
return PetApiFp(configuration).getPetById(petId, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -892,7 +892,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updatePet(pet: Pet, options?: any) {
|
updatePet(pet: Pet, options?: any) {
|
||||||
return PetApiFp(configuration).updatePet(pet, options)(basePath);
|
return PetApiFp(configuration).updatePet(pet, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -904,7 +904,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||||
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options)(basePath);
|
return PetApiFp(configuration).updatePetWithForm(petId, name, status, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -916,7 +916,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||||
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options)(basePath);
|
return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -937,7 +937,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public addPet(pet: Pet, options?: any) {
|
public addPet(pet: Pet, options?: any) {
|
||||||
return PetApiFp(this.configuration).addPet(pet, options)(this.basePath);
|
return PetApiFp(this.configuration).addPet(pet, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -950,7 +950,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public deletePet(petId: number, apiKey?: string, options?: any) {
|
public deletePet(petId: number, apiKey?: string, options?: any) {
|
||||||
return PetApiFp(this.configuration).deletePet(petId, apiKey, options)(this.basePath);
|
return PetApiFp(this.configuration).deletePet(petId, apiKey, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -962,7 +962,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any) {
|
||||||
return PetApiFp(this.configuration).findPetsByStatus(status, options)(this.basePath);
|
return PetApiFp(this.configuration).findPetsByStatus(status, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -974,7 +974,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public findPetsByTags(tags: Array<string>, options?: any) {
|
public findPetsByTags(tags: Array<string>, options?: any) {
|
||||||
return PetApiFp(this.configuration).findPetsByTags(tags, options)(this.basePath);
|
return PetApiFp(this.configuration).findPetsByTags(tags, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -986,7 +986,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public getPetById(petId: number, options?: any) {
|
public getPetById(petId: number, options?: any) {
|
||||||
return PetApiFp(this.configuration).getPetById(petId, options)(this.basePath);
|
return PetApiFp(this.configuration).getPetById(petId, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -998,7 +998,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public updatePet(pet: Pet, options?: any) {
|
public updatePet(pet: Pet, options?: any) {
|
||||||
return PetApiFp(this.configuration).updatePet(pet, options)(this.basePath);
|
return PetApiFp(this.configuration).updatePet(pet, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1012,7 +1012,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
public updatePetWithForm(petId: number, name?: string, status?: string, options?: any) {
|
||||||
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options)(this.basePath);
|
return PetApiFp(this.configuration).updatePetWithForm(petId, name, status, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1026,7 +1026,7 @@ export class PetApi extends BaseAPI {
|
|||||||
* @memberof PetApi
|
* @memberof PetApi
|
||||||
*/
|
*/
|
||||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) {
|
||||||
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options)(this.basePath);
|
return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1190,9 +1190,9 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deleteOrder(orderId: string, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
deleteOrder(orderId: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1203,9 +1203,9 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getInventory(options?: any): (basePath?: string) => AxiosPromise<{ [key: string]: number; }> {
|
getInventory(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }> {
|
||||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getInventory(options);
|
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getInventory(options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1217,9 +1217,9 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getOrderById(orderId: number, options?: any): (basePath?: string) => AxiosPromise<Order> {
|
getOrderById(orderId: number, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1231,9 +1231,9 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
placeOrder(order: Order, options?: any): (basePath?: string) => AxiosPromise<Order> {
|
placeOrder(order: Order, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order> {
|
||||||
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).placeOrder(order, options);
|
const localVarAxiosArgs = StoreApiAxiosParamCreator(configuration).placeOrder(order, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1245,7 +1245,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
|
|||||||
* StoreApi - factory interface
|
* StoreApi - factory interface
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export const StoreApiFactory = function (configuration?: Configuration, basePath?: string) {
|
export const StoreApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
@ -1255,7 +1255,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deleteOrder(orderId: string, options?: any) {
|
deleteOrder(orderId: string, options?: any) {
|
||||||
return StoreApiFp(configuration).deleteOrder(orderId, options)(basePath);
|
return StoreApiFp(configuration).deleteOrder(orderId, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Returns a map of status codes to quantities
|
* Returns a map of status codes to quantities
|
||||||
@ -1264,7 +1264,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getInventory(options?: any) {
|
getInventory(options?: any) {
|
||||||
return StoreApiFp(configuration).getInventory(options)(basePath);
|
return StoreApiFp(configuration).getInventory(options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
@ -1274,7 +1274,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getOrderById(orderId: number, options?: any) {
|
getOrderById(orderId: number, options?: any) {
|
||||||
return StoreApiFp(configuration).getOrderById(orderId, options)(basePath);
|
return StoreApiFp(configuration).getOrderById(orderId, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1284,7 +1284,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
placeOrder(order: Order, options?: any) {
|
placeOrder(order: Order, options?: any) {
|
||||||
return StoreApiFp(configuration).placeOrder(order, options)(basePath);
|
return StoreApiFp(configuration).placeOrder(order, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -1305,7 +1305,7 @@ export class StoreApi extends BaseAPI {
|
|||||||
* @memberof StoreApi
|
* @memberof StoreApi
|
||||||
*/
|
*/
|
||||||
public deleteOrder(orderId: string, options?: any) {
|
public deleteOrder(orderId: string, options?: any) {
|
||||||
return StoreApiFp(this.configuration).deleteOrder(orderId, options)(this.basePath);
|
return StoreApiFp(this.configuration).deleteOrder(orderId, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1316,7 +1316,7 @@ export class StoreApi extends BaseAPI {
|
|||||||
* @memberof StoreApi
|
* @memberof StoreApi
|
||||||
*/
|
*/
|
||||||
public getInventory(options?: any) {
|
public getInventory(options?: any) {
|
||||||
return StoreApiFp(this.configuration).getInventory(options)(this.basePath);
|
return StoreApiFp(this.configuration).getInventory(options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1328,7 +1328,7 @@ export class StoreApi extends BaseAPI {
|
|||||||
* @memberof StoreApi
|
* @memberof StoreApi
|
||||||
*/
|
*/
|
||||||
public getOrderById(orderId: number, options?: any) {
|
public getOrderById(orderId: number, options?: any) {
|
||||||
return StoreApiFp(this.configuration).getOrderById(orderId, options)(this.basePath);
|
return StoreApiFp(this.configuration).getOrderById(orderId, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1340,7 +1340,7 @@ export class StoreApi extends BaseAPI {
|
|||||||
* @memberof StoreApi
|
* @memberof StoreApi
|
||||||
*/
|
*/
|
||||||
public placeOrder(order: Order, options?: any) {
|
public placeOrder(order: Order, options?: any) {
|
||||||
return StoreApiFp(this.configuration).placeOrder(order, options)(this.basePath);
|
return StoreApiFp(this.configuration).placeOrder(order, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1655,9 +1655,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUser(user: User, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
createUser(user: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUser(user, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUser(user, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1669,9 +1669,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUsersWithArrayInput(user: Array<User>, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
createUsersWithArrayInput(user: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(user, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(user, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1683,9 +1683,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUsersWithListInput(user: Array<User>, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
createUsersWithListInput(user: Array<User>, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithListInput(user, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).createUsersWithListInput(user, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1697,9 +1697,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deleteUser(username: string, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
deleteUser(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).deleteUser(username, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1711,9 +1711,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getUserByName(username: string, options?: any): (basePath?: string) => AxiosPromise<User> {
|
getUserByName(username: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<User> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).getUserByName(username, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1726,9 +1726,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
loginUser(username: string, password: string, options?: any): (basePath?: string) => AxiosPromise<string> {
|
loginUser(username: string, password: string, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<string> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).loginUser(username, password, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1739,9 +1739,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
logoutUser(options?: any): (basePath?: string) => AxiosPromise<Response> {
|
logoutUser(options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).logoutUser(options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).logoutUser(options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1754,9 +1754,9 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updateUser(username: string, user: User, options?: any): (basePath?: string) => AxiosPromise<Response> {
|
updateUser(username: string, user: User, options?: any): (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Response> {
|
||||||
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).updateUser(username, user, options);
|
const localVarAxiosArgs = UserApiAxiosParamCreator(configuration).updateUser(username, user, options);
|
||||||
return (basePath: string = BASE_PATH) => {
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
const axiosRequestArgs = Object.assign(localVarAxiosArgs.options, {url: basePath + localVarAxiosArgs.url})
|
||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
@ -1768,7 +1768,7 @@ export const UserApiFp = function(configuration?: Configuration) {
|
|||||||
* UserApi - factory interface
|
* UserApi - factory interface
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export const UserApiFactory = function (configuration?: Configuration, basePath?: string) {
|
export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -1778,7 +1778,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUser(user: User, options?: any) {
|
createUser(user: User, options?: any) {
|
||||||
return UserApiFp(configuration).createUser(user, options)(basePath);
|
return UserApiFp(configuration).createUser(user, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1788,7 +1788,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUsersWithArrayInput(user: Array<User>, options?: any) {
|
createUsersWithArrayInput(user: Array<User>, options?: any) {
|
||||||
return UserApiFp(configuration).createUsersWithArrayInput(user, options)(basePath);
|
return UserApiFp(configuration).createUsersWithArrayInput(user, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1798,7 +1798,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
createUsersWithListInput(user: Array<User>, options?: any) {
|
createUsersWithListInput(user: Array<User>, options?: any) {
|
||||||
return UserApiFp(configuration).createUsersWithListInput(user, options)(basePath);
|
return UserApiFp(configuration).createUsersWithListInput(user, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -1808,7 +1808,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
deleteUser(username: string, options?: any) {
|
deleteUser(username: string, options?: any) {
|
||||||
return UserApiFp(configuration).deleteUser(username, options)(basePath);
|
return UserApiFp(configuration).deleteUser(username, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1818,7 +1818,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
getUserByName(username: string, options?: any) {
|
getUserByName(username: string, options?: any) {
|
||||||
return UserApiFp(configuration).getUserByName(username, options)(basePath);
|
return UserApiFp(configuration).getUserByName(username, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1829,7 +1829,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
loginUser(username: string, password: string, options?: any) {
|
loginUser(username: string, password: string, options?: any) {
|
||||||
return UserApiFp(configuration).loginUser(username, password, options)(basePath);
|
return UserApiFp(configuration).loginUser(username, password, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1838,7 +1838,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
logoutUser(options?: any) {
|
logoutUser(options?: any) {
|
||||||
return UserApiFp(configuration).logoutUser(options)(basePath);
|
return UserApiFp(configuration).logoutUser(options)(axios, basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
@ -1849,7 +1849,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
updateUser(username: string, user: User, options?: any) {
|
updateUser(username: string, user: User, options?: any) {
|
||||||
return UserApiFp(configuration).updateUser(username, user, options)(basePath);
|
return UserApiFp(configuration).updateUser(username, user, options)(axios, basePath);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -1870,7 +1870,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public createUser(user: User, options?: any) {
|
public createUser(user: User, options?: any) {
|
||||||
return UserApiFp(this.configuration).createUser(user, options)(this.basePath);
|
return UserApiFp(this.configuration).createUser(user, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1882,7 +1882,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public createUsersWithArrayInput(user: Array<User>, options?: any) {
|
public createUsersWithArrayInput(user: Array<User>, options?: any) {
|
||||||
return UserApiFp(this.configuration).createUsersWithArrayInput(user, options)(this.basePath);
|
return UserApiFp(this.configuration).createUsersWithArrayInput(user, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1894,7 +1894,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public createUsersWithListInput(user: Array<User>, options?: any) {
|
public createUsersWithListInput(user: Array<User>, options?: any) {
|
||||||
return UserApiFp(this.configuration).createUsersWithListInput(user, options)(this.basePath);
|
return UserApiFp(this.configuration).createUsersWithListInput(user, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1906,7 +1906,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public deleteUser(username: string, options?: any) {
|
public deleteUser(username: string, options?: any) {
|
||||||
return UserApiFp(this.configuration).deleteUser(username, options)(this.basePath);
|
return UserApiFp(this.configuration).deleteUser(username, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1918,7 +1918,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public getUserByName(username: string, options?: any) {
|
public getUserByName(username: string, options?: any) {
|
||||||
return UserApiFp(this.configuration).getUserByName(username, options)(this.basePath);
|
return UserApiFp(this.configuration).getUserByName(username, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1931,7 +1931,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public loginUser(username: string, password: string, options?: any) {
|
public loginUser(username: string, password: string, options?: any) {
|
||||||
return UserApiFp(this.configuration).loginUser(username, password, options)(this.basePath);
|
return UserApiFp(this.configuration).loginUser(username, password, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1942,7 +1942,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public logoutUser(options?: any) {
|
public logoutUser(options?: any) {
|
||||||
return UserApiFp(this.configuration).logoutUser(options)(this.basePath);
|
return UserApiFp(this.configuration).logoutUser(options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1955,7 +1955,7 @@ export class UserApi extends BaseAPI {
|
|||||||
* @memberof UserApi
|
* @memberof UserApi
|
||||||
*/
|
*/
|
||||||
public updateUser(username: string, user: User, options?: any) {
|
public updateUser(username: string, user: User, options?: any) {
|
||||||
return UserApiFp(this.configuration).updateUser(username, user, options)(this.basePath);
|
return UserApiFp(this.configuration).updateUser(username, user, options)(this.axios, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,13 +2,14 @@
|
|||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
var chai_1 = require("chai");
|
var chai_1 = require("chai");
|
||||||
var typescript_axios_petstore_1 = require("@swagger/typescript-axios-petstore");
|
var typescript_axios_petstore_1 = require("@swagger/typescript-axios-petstore");
|
||||||
|
var axios_1 = require("axios");
|
||||||
describe("PetApi", function () {
|
describe("PetApi", function () {
|
||||||
function runSuite(description, requestOptions) {
|
function runSuite(description, requestOptions, customAxiosInstance) {
|
||||||
describe(description, function () {
|
describe(description, function () {
|
||||||
var api;
|
var api;
|
||||||
var fixture = createTestFixture();
|
var fixture = createTestFixture();
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
api = new typescript_axios_petstore_1.PetApi();
|
api = new typescript_axios_petstore_1.PetApi(undefined, undefined, customAxiosInstance);
|
||||||
});
|
});
|
||||||
it("should add and delete Pet", function () {
|
it("should add and delete Pet", function () {
|
||||||
return api.addPet(fixture, requestOptions).then(function () { });
|
return api.addPet(fixture, requestOptions).then(function () { });
|
||||||
@ -52,6 +53,12 @@ describe("PetApi", function () {
|
|||||||
credentials: "include",
|
credentials: "include",
|
||||||
mode: "cors"
|
mode: "cors"
|
||||||
});
|
});
|
||||||
|
runSuite("without custom axios instance");
|
||||||
|
runSuite("with custom axios instance", {}, axios_1.default);
|
||||||
|
runSuite("with custom request options and custom axios instance", {
|
||||||
|
credentials: "include",
|
||||||
|
mode: "cors"
|
||||||
|
}, axios_1.default);
|
||||||
});
|
});
|
||||||
function createTestFixture(ts) {
|
function createTestFixture(ts) {
|
||||||
if (ts === void 0) { ts = Date.now(); }
|
if (ts === void 0) { ts = Date.now(); }
|
||||||
|
@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
var chai_1 = require("chai");
|
var chai_1 = require("chai");
|
||||||
var typescript_axios_petstore_1 = require("@swagger/typescript-axios-petstore");
|
var typescript_axios_petstore_1 = require("@swagger/typescript-axios-petstore");
|
||||||
var typescript_axios_petstore_2 = require("@swagger/typescript-axios-petstore");
|
var typescript_axios_petstore_2 = require("@swagger/typescript-axios-petstore");
|
||||||
|
var axios_1 = require("axios");
|
||||||
var config;
|
var config;
|
||||||
before(function () {
|
before(function () {
|
||||||
config = new typescript_axios_petstore_2.Configuration();
|
config = new typescript_axios_petstore_2.Configuration();
|
||||||
@ -18,23 +19,23 @@ before(function () {
|
|||||||
config.password = "bar";
|
config.password = "bar";
|
||||||
});
|
});
|
||||||
describe("PetApiFactory", function () {
|
describe("PetApiFactory", function () {
|
||||||
function runSuite(description, requestOptions) {
|
function runSuite(description, requestOptions, customAxiosInstance) {
|
||||||
describe(description, function () {
|
describe(description, function () {
|
||||||
var fixture = createTestFixture();
|
var fixture = createTestFixture();
|
||||||
it("should add and delete Pet", function () {
|
it("should add and delete Pet", function () {
|
||||||
return typescript_axios_petstore_1.PetApiFactory(config)
|
return typescript_axios_petstore_1.PetApiFactory(config, undefined, customAxiosInstance)
|
||||||
.addPet(fixture, requestOptions)
|
.addPet(fixture, requestOptions)
|
||||||
.then(function () { });
|
.then(function () { });
|
||||||
});
|
});
|
||||||
it("should get Pet by ID", function () {
|
it("should get Pet by ID", function () {
|
||||||
return typescript_axios_petstore_1.PetApiFactory(config)
|
return typescript_axios_petstore_1.PetApiFactory(config, undefined, customAxiosInstance)
|
||||||
.getPetById(fixture.id, requestOptions)
|
.getPetById(fixture.id, requestOptions)
|
||||||
.then(function (result) {
|
.then(function (result) {
|
||||||
return chai_1.expect(result.data).to.deep.equal(fixture);
|
return chai_1.expect(result.data).to.deep.equal(fixture);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it("should update Pet by ID", function () {
|
it("should update Pet by ID", function () {
|
||||||
return typescript_axios_petstore_1.PetApiFactory(config)
|
return typescript_axios_petstore_1.PetApiFactory(config, undefined, customAxiosInstance)
|
||||||
.getPetById(fixture.id, requestOptions)
|
.getPetById(fixture.id, requestOptions)
|
||||||
.then(function (result) {
|
.then(function (result) {
|
||||||
result.data.name = "newname";
|
result.data.name = "newname";
|
||||||
@ -50,10 +51,10 @@ describe("PetApiFactory", function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
it("should delete Pet", function () {
|
it("should delete Pet", function () {
|
||||||
return typescript_axios_petstore_1.PetApiFactory(config).deletePet(fixture.id, requestOptions);
|
return typescript_axios_petstore_1.PetApiFactory(config, undefined, customAxiosInstance).deletePet(fixture.id, requestOptions);
|
||||||
});
|
});
|
||||||
it("should not contain deleted Pet", function () {
|
it("should not contain deleted Pet", function () {
|
||||||
return typescript_axios_petstore_1.PetApiFactory(config)
|
return typescript_axios_petstore_1.PetApiFactory(config, undefined, customAxiosInstance)
|
||||||
.getPetById(fixture.id, requestOptions)
|
.getPetById(fixture.id, requestOptions)
|
||||||
.then(function (result) {
|
.then(function (result) {
|
||||||
return chai_1.expect(result.data).to.not.exist;
|
return chai_1.expect(result.data).to.not.exist;
|
||||||
@ -68,6 +69,12 @@ describe("PetApiFactory", function () {
|
|||||||
credentials: "include",
|
credentials: "include",
|
||||||
mode: "cors"
|
mode: "cors"
|
||||||
});
|
});
|
||||||
|
runSuite("without custom axios instance");
|
||||||
|
runSuite("with custom axios instance", {}, axios_1.default);
|
||||||
|
runSuite("with custom request options and custom axios instance", {
|
||||||
|
credentials: "include",
|
||||||
|
mode: "cors"
|
||||||
|
}, axios_1.default);
|
||||||
});
|
});
|
||||||
function createTestFixture(ts) {
|
function createTestFixture(ts) {
|
||||||
if (ts === void 0) { ts = Date.now(); }
|
if (ts === void 0) { ts = Date.now(); }
|
||||||
|
@ -2,12 +2,13 @@
|
|||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
var chai_1 = require("chai");
|
var chai_1 = require("chai");
|
||||||
var typescript_axios_petstore_1 = require("@swagger/typescript-axios-petstore");
|
var typescript_axios_petstore_1 = require("@swagger/typescript-axios-petstore");
|
||||||
|
var axios_1 = require("axios");
|
||||||
describe("StoreApi", function () {
|
describe("StoreApi", function () {
|
||||||
function runSuite(description, requestOptions) {
|
function runSuite(description, requestOptions, customAxiosInstance) {
|
||||||
describe(description, function () {
|
describe(description, function () {
|
||||||
var api;
|
var api;
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
api = new typescript_axios_petstore_1.StoreApi();
|
api = new typescript_axios_petstore_1.StoreApi(undefined, undefined, customAxiosInstance);
|
||||||
});
|
});
|
||||||
it("should get inventory", function () {
|
it("should get inventory", function () {
|
||||||
return api
|
return api
|
||||||
@ -23,4 +24,10 @@ describe("StoreApi", function () {
|
|||||||
credentials: "include",
|
credentials: "include",
|
||||||
mode: "cors"
|
mode: "cors"
|
||||||
});
|
});
|
||||||
|
runSuite("without custom axios instance");
|
||||||
|
runSuite("with custom axios instance", {}, axios_1.default);
|
||||||
|
runSuite("with custom request options and custom axios instance", {
|
||||||
|
credentials: "include",
|
||||||
|
mode: "cors"
|
||||||
|
}, axios_1.default);
|
||||||
});
|
});
|
||||||
|
@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
var chai_1 = require("chai");
|
var chai_1 = require("chai");
|
||||||
var typescript_axios_petstore_1 = require("@swagger/typescript-axios-petstore");
|
var typescript_axios_petstore_1 = require("@swagger/typescript-axios-petstore");
|
||||||
var typescript_axios_petstore_2 = require("@swagger/typescript-axios-petstore");
|
var typescript_axios_petstore_2 = require("@swagger/typescript-axios-petstore");
|
||||||
|
var axios_1 = require("axios");
|
||||||
var config;
|
var config;
|
||||||
before(function () {
|
before(function () {
|
||||||
config = new typescript_axios_petstore_2.Configuration();
|
config = new typescript_axios_petstore_2.Configuration();
|
||||||
@ -18,10 +19,10 @@ before(function () {
|
|||||||
config.password = "bar";
|
config.password = "bar";
|
||||||
});
|
});
|
||||||
describe("StoreApiFactory", function () {
|
describe("StoreApiFactory", function () {
|
||||||
function runSuite(description, requestOptions) {
|
function runSuite(description, requestOptions, customAxiosInstance) {
|
||||||
describe(description, function () {
|
describe(description, function () {
|
||||||
it("should get inventory", function () {
|
it("should get inventory", function () {
|
||||||
return typescript_axios_petstore_1.StoreApiFactory(config)
|
return typescript_axios_petstore_1.StoreApiFactory(config, undefined, customAxiosInstance)
|
||||||
.getInventory(requestOptions)
|
.getInventory(requestOptions)
|
||||||
.then(function (result) {
|
.then(function (result) {
|
||||||
chai_1.expect(Object.keys(result.data)).to.not.be.empty;
|
chai_1.expect(Object.keys(result.data)).to.not.be.empty;
|
||||||
@ -34,4 +35,10 @@ describe("StoreApiFactory", function () {
|
|||||||
credentials: "include",
|
credentials: "include",
|
||||||
mode: "cors"
|
mode: "cors"
|
||||||
});
|
});
|
||||||
|
runSuite("without custom axios instance");
|
||||||
|
runSuite("with custom axios instance", {}, axios_1.default);
|
||||||
|
runSuite("with custom request options and custom axios instance", {
|
||||||
|
credentials: "include",
|
||||||
|
mode: "cors"
|
||||||
|
}, axios_1.default);
|
||||||
});
|
});
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import { expect } from "chai";
|
import { expect } from "chai";
|
||||||
import { PetApi, Pet, Category } from "@swagger/typescript-axios-petstore";
|
import { PetApi, Pet, Category } from "@swagger/typescript-axios-petstore";
|
||||||
import { AxiosResponse } from "axios";
|
import axios, {AxiosInstance, AxiosResponse} from "axios";
|
||||||
|
|
||||||
describe("PetApi", () => {
|
describe("PetApi", () => {
|
||||||
function runSuite(description: string, requestOptions?: any): void {
|
function runSuite(description: string, requestOptions?: any, customAxiosInstance?: AxiosInstance): void {
|
||||||
describe(description, () => {
|
describe(description, () => {
|
||||||
let api: PetApi;
|
let api: PetApi;
|
||||||
const fixture: Pet = createTestFixture();
|
const fixture: Pet = createTestFixture();
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
api = new PetApi();
|
api = new PetApi(undefined, undefined, customAxiosInstance);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should add and delete Pet", () => {
|
it("should add and delete Pet", () => {
|
||||||
@ -63,6 +63,15 @@ describe("PetApi", () => {
|
|||||||
credentials: "include",
|
credentials: "include",
|
||||||
mode: "cors"
|
mode: "cors"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
runSuite("without custom axios instance");
|
||||||
|
|
||||||
|
runSuite("with custom axios instance",{}, axios);
|
||||||
|
|
||||||
|
runSuite("with custom request options and custom axios instance",{
|
||||||
|
credentials: "include",
|
||||||
|
mode: "cors"
|
||||||
|
}, axios);
|
||||||
});
|
});
|
||||||
|
|
||||||
function createTestFixture(ts = Date.now()) {
|
function createTestFixture(ts = Date.now()) {
|
||||||
|
@ -5,7 +5,7 @@ import {
|
|||||||
Category
|
Category
|
||||||
} from "@swagger/typescript-axios-petstore";
|
} from "@swagger/typescript-axios-petstore";
|
||||||
import { Configuration } from "@swagger/typescript-axios-petstore";
|
import { Configuration } from "@swagger/typescript-axios-petstore";
|
||||||
import { AxiosResponse } from "axios";
|
import axios, {AxiosInstance, AxiosResponse} from "axios";
|
||||||
|
|
||||||
let config: Configuration;
|
let config: Configuration;
|
||||||
|
|
||||||
@ -24,18 +24,18 @@ before(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("PetApiFactory", () => {
|
describe("PetApiFactory", () => {
|
||||||
function runSuite(description: string, requestOptions?: any): void {
|
function runSuite(description: string, requestOptions?: any, customAxiosInstance?: AxiosInstance): void {
|
||||||
describe(description, () => {
|
describe(description, () => {
|
||||||
const fixture: Pet = createTestFixture();
|
const fixture: Pet = createTestFixture();
|
||||||
|
|
||||||
it("should add and delete Pet", () => {
|
it("should add and delete Pet", () => {
|
||||||
return PetApiFactory(config)
|
return PetApiFactory(config, undefined, customAxiosInstance)
|
||||||
.addPet(fixture, requestOptions)
|
.addPet(fixture, requestOptions)
|
||||||
.then(() => {});
|
.then(() => {});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should get Pet by ID", () => {
|
it("should get Pet by ID", () => {
|
||||||
return PetApiFactory(config)
|
return PetApiFactory(config, undefined, customAxiosInstance)
|
||||||
.getPetById(fixture.id, requestOptions)
|
.getPetById(fixture.id, requestOptions)
|
||||||
.then((result: AxiosResponse<Pet>) => {
|
.then((result: AxiosResponse<Pet>) => {
|
||||||
return expect(result.data).to.deep.equal(fixture);
|
return expect(result.data).to.deep.equal(fixture);
|
||||||
@ -43,7 +43,7 @@ describe("PetApiFactory", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should update Pet by ID", () => {
|
it("should update Pet by ID", () => {
|
||||||
return PetApiFactory(config)
|
return PetApiFactory(config, undefined, customAxiosInstance)
|
||||||
.getPetById(fixture.id, requestOptions)
|
.getPetById(fixture.id, requestOptions)
|
||||||
.then((result: AxiosResponse<Pet>) => {
|
.then((result: AxiosResponse<Pet>) => {
|
||||||
result.data.name = "newname";
|
result.data.name = "newname";
|
||||||
@ -60,11 +60,11 @@ describe("PetApiFactory", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should delete Pet", () => {
|
it("should delete Pet", () => {
|
||||||
return PetApiFactory(config).deletePet(fixture.id, requestOptions);
|
return PetApiFactory(config, undefined, customAxiosInstance).deletePet(fixture.id, requestOptions);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should not contain deleted Pet", () => {
|
it("should not contain deleted Pet", () => {
|
||||||
return PetApiFactory(config)
|
return PetApiFactory(config, undefined, customAxiosInstance)
|
||||||
.getPetById(fixture.id, requestOptions)
|
.getPetById(fixture.id, requestOptions)
|
||||||
.then(
|
.then(
|
||||||
(result: AxiosResponse<Pet>) => {
|
(result: AxiosResponse<Pet>) => {
|
||||||
@ -84,6 +84,15 @@ describe("PetApiFactory", () => {
|
|||||||
credentials: "include",
|
credentials: "include",
|
||||||
mode: "cors"
|
mode: "cors"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
runSuite("without custom axios instance");
|
||||||
|
|
||||||
|
runSuite("with custom axios instance",{}, axios);
|
||||||
|
|
||||||
|
runSuite("with custom request options and custom axios instance",{
|
||||||
|
credentials: "include",
|
||||||
|
mode: "cors"
|
||||||
|
}, axios);
|
||||||
});
|
});
|
||||||
|
|
||||||
function createTestFixture(ts = Date.now()) {
|
function createTestFixture(ts = Date.now()) {
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import { expect } from "chai";
|
import { expect } from "chai";
|
||||||
import { StoreApi } from "@swagger/typescript-axios-petstore";
|
import { StoreApi } from "@swagger/typescript-axios-petstore";
|
||||||
import { AxiosResponse } from "axios";
|
import axios, {AxiosInstance, AxiosResponse} from "axios";
|
||||||
|
|
||||||
describe("StoreApi", function() {
|
describe("StoreApi", function() {
|
||||||
function runSuite(description: string, requestOptions?: any): void {
|
function runSuite(description: string, requestOptions?: any, customAxiosInstance?: AxiosInstance): void {
|
||||||
describe(description, () => {
|
describe(description, () => {
|
||||||
let api: StoreApi;
|
let api: StoreApi;
|
||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
api = new StoreApi();
|
api = new StoreApi(undefined, undefined, customAxiosInstance);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should get inventory", function() {
|
it("should get inventory", function() {
|
||||||
@ -27,4 +27,13 @@ describe("StoreApi", function() {
|
|||||||
credentials: "include",
|
credentials: "include",
|
||||||
mode: "cors"
|
mode: "cors"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
runSuite("without custom axios instance");
|
||||||
|
|
||||||
|
runSuite("with custom axios instance",{}, axios);
|
||||||
|
|
||||||
|
runSuite("with custom request options and custom axios instance",{
|
||||||
|
credentials: "include",
|
||||||
|
mode: "cors"
|
||||||
|
}, axios);
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import { expect } from "chai";
|
import { expect } from "chai";
|
||||||
import { StoreApiFactory } from "@swagger/typescript-axios-petstore";
|
import { StoreApiFactory } from "@swagger/typescript-axios-petstore";
|
||||||
import { Configuration } from "@swagger/typescript-axios-petstore";
|
import { Configuration } from "@swagger/typescript-axios-petstore";
|
||||||
import { AxiosResponse } from "axios";
|
import {AxiosInstance, AxiosResponse} from "axios";
|
||||||
|
import axios from "axios";
|
||||||
|
|
||||||
let config: Configuration;
|
let config: Configuration;
|
||||||
|
|
||||||
@ -20,10 +21,10 @@ before(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("StoreApiFactory", function() {
|
describe("StoreApiFactory", function() {
|
||||||
function runSuite(description: string, requestOptions?: any): void {
|
function runSuite(description: string, requestOptions?: any, customAxiosInstance?: AxiosInstance): void {
|
||||||
describe(description, () => {
|
describe(description, () => {
|
||||||
it("should get inventory", function() {
|
it("should get inventory", function() {
|
||||||
return StoreApiFactory(config)
|
return StoreApiFactory(config, undefined, customAxiosInstance)
|
||||||
.getInventory(requestOptions)
|
.getInventory(requestOptions)
|
||||||
.then((result: AxiosResponse<{ [key: string]: number }>) => {
|
.then((result: AxiosResponse<{ [key: string]: number }>) => {
|
||||||
expect(Object.keys(result.data)).to.not.be.empty;
|
expect(Object.keys(result.data)).to.not.be.empty;
|
||||||
@ -38,4 +39,13 @@ describe("StoreApiFactory", function() {
|
|||||||
credentials: "include",
|
credentials: "include",
|
||||||
mode: "cors"
|
mode: "cors"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
runSuite("without custom axios instance");
|
||||||
|
|
||||||
|
runSuite("with custom axios instance",{}, axios);
|
||||||
|
|
||||||
|
runSuite("with custom request options and custom axios instance",{
|
||||||
|
credentials: "include",
|
||||||
|
mode: "cors"
|
||||||
|
}, axios);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user