mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 12:40:53 +00:00
fix(typescript-angular): enable "exactOptionalPropertyTypes" and ensure assignments align with type definition (#20451)
* fix(typescript-angular): enable "exactOptionalPropertyTypes" and ensure assignments align with type definition * fix(typescript-angular): update condition checks to explicitly compare with undefined * chore(gradle): add autogenerated properties file for OpenAPI Generator
This commit is contained in:
parent
a7159f6bcb
commit
dfbe985db3
@ -275,7 +275,8 @@ export class {{classname}} extends BaseService {
|
|||||||
|
|
||||||
{{/isResponseFile}}
|
{{/isResponseFile}}
|
||||||
let localVarPath = `{{{path}}}`;
|
let localVarPath = `{{{path}}}`;
|
||||||
return this.httpClient.request{{^isResponseFile}}<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>{{/isResponseFile}}('{{httpMethod}}', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request{{^isResponseFile}}<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>{{/isResponseFile}}('{{httpMethod}}', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
{{#httpContextInOptions}}
|
{{#httpContextInOptions}}
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
@ -297,7 +298,7 @@ export class {{classname}} extends BaseService {
|
|||||||
{{^isResponseFile}}
|
{{^isResponseFile}}
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
{{/isResponseFile}}
|
{{/isResponseFile}}
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
{{#httpTransferCacheInOptions}}
|
{{#httpTransferCacheInOptions}}
|
||||||
|
@ -66,26 +66,30 @@ export class {{configurationClassName}} {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: {{configurationParametersInterfaceName}} = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: {{configurationParametersInterfaceName}} = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
{{#authMethods}}
|
{{#authMethods}}
|
||||||
|
|
||||||
// init default {{name}} credential
|
// init default {{name}} credential
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
"module": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}commonjs{{/supportsES6}}",
|
"module": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}commonjs{{/supportsES6}}",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
|
"strictNullChecks": true,
|
||||||
|
"exactOptionalPropertyTypes": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"noLib": false,
|
"noLib": false,
|
||||||
|
@ -70,11 +70,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/mapped`;
|
let localVarPath = `/pet/mapped`;
|
||||||
return this.httpClient.request<Array<PetWithMappedDiscriminatorModel>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<PetWithMappedDiscriminatorModel>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
|
@ -66,26 +66,30 @@ export class Configuration {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -70,11 +70,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/mapped`;
|
let localVarPath = `/pet/mapped`;
|
||||||
return this.httpClient.request<Array<PetWithMappedDiscriminatorModel>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<PetWithMappedDiscriminatorModel>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
|
@ -66,26 +66,30 @@ export class Configuration {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -68,11 +68,12 @@ export class DefaultService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/`;
|
let localVarPath = `/`;
|
||||||
return this.httpClient.request<Fruit>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Fruit>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -122,12 +123,13 @@ export class DefaultService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/`;
|
let localVarPath = `/`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -66,26 +66,30 @@ export class Configuration {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -87,12 +87,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -144,11 +145,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -205,12 +207,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByStatus`;
|
let localVarPath = `/pet/findByStatus`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -268,12 +271,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByTags`;
|
let localVarPath = `/pet/findByTags`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -324,11 +328,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Pet>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -386,12 +391,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -463,12 +469,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -544,12 +551,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
||||||
return this.httpClient.request<ApiResponse>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<ApiResponse>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -73,11 +73,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -123,11 +124,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/inventory`;
|
let localVarPath = `/store/inventory`;
|
||||||
return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<{ [key: string]: number; }>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -175,11 +177,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Order>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -234,12 +237,13 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order`;
|
let localVarPath = `/store/order`;
|
||||||
return this.httpClient.request<Order>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -81,12 +81,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user`;
|
let localVarPath = `/user`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -139,12 +140,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithArray`;
|
let localVarPath = `/user/createWithArray`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -197,12 +199,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithList`;
|
let localVarPath = `/user/createWithList`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -248,11 +251,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -299,11 +303,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<User>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<User>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -360,12 +365,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/login`;
|
let localVarPath = `/user/login`;
|
||||||
return this.httpClient.request<string>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<string>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -406,11 +412,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/logout`;
|
let localVarPath = `/user/logout`;
|
||||||
return this.httpClient.request<any>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -468,12 +475,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -66,26 +66,30 @@ export class Configuration {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
|
|
||||||
// init default petstore_auth credential
|
// init default petstore_auth credential
|
||||||
if (!this.credentials['petstore_auth']) {
|
if (!this.credentials['petstore_auth']) {
|
||||||
|
@ -87,12 +87,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -144,11 +145,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -205,12 +207,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByStatus`;
|
let localVarPath = `/pet/findByStatus`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -268,12 +271,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByTags`;
|
let localVarPath = `/pet/findByTags`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -324,11 +328,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Pet>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -386,12 +391,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -463,12 +469,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -544,12 +551,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
||||||
return this.httpClient.request<ApiResponse>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<ApiResponse>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -73,11 +73,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -123,11 +124,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/inventory`;
|
let localVarPath = `/store/inventory`;
|
||||||
return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<{ [key: string]: number; }>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -175,11 +177,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Order>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -234,12 +237,13 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order`;
|
let localVarPath = `/store/order`;
|
||||||
return this.httpClient.request<Order>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -81,12 +81,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user`;
|
let localVarPath = `/user`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -139,12 +140,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithArray`;
|
let localVarPath = `/user/createWithArray`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -197,12 +199,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithList`;
|
let localVarPath = `/user/createWithList`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -248,11 +251,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -299,11 +303,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<User>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<User>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -360,12 +365,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/login`;
|
let localVarPath = `/user/login`;
|
||||||
return this.httpClient.request<string>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<string>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -406,11 +412,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/logout`;
|
let localVarPath = `/user/logout`;
|
||||||
return this.httpClient.request<any>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -468,12 +475,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -66,26 +66,30 @@ export class Configuration {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
|
|
||||||
// init default petstore_auth credential
|
// init default petstore_auth credential
|
||||||
if (!this.credentials['petstore_auth']) {
|
if (!this.credentials['petstore_auth']) {
|
||||||
|
@ -87,12 +87,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -144,11 +145,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -205,12 +207,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByStatus`;
|
let localVarPath = `/pet/findByStatus`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -268,12 +271,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByTags`;
|
let localVarPath = `/pet/findByTags`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -324,11 +328,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Pet>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -386,12 +391,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -463,12 +469,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -544,12 +551,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
||||||
return this.httpClient.request<ApiResponse>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<ApiResponse>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -73,11 +73,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -123,11 +124,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/inventory`;
|
let localVarPath = `/store/inventory`;
|
||||||
return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<{ [key: string]: number; }>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -175,11 +177,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Order>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -234,12 +237,13 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order`;
|
let localVarPath = `/store/order`;
|
||||||
return this.httpClient.request<Order>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -81,12 +81,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user`;
|
let localVarPath = `/user`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -139,12 +140,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithArray`;
|
let localVarPath = `/user/createWithArray`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -197,12 +199,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithList`;
|
let localVarPath = `/user/createWithList`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -248,11 +251,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -299,11 +303,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<User>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<User>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -360,12 +365,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/login`;
|
let localVarPath = `/user/login`;
|
||||||
return this.httpClient.request<string>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<string>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -406,11 +412,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/logout`;
|
let localVarPath = `/user/logout`;
|
||||||
return this.httpClient.request<any>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -468,12 +475,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -66,26 +66,30 @@ export class Configuration {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
|
|
||||||
// init default petstore_auth credential
|
// init default petstore_auth credential
|
||||||
if (!this.credentials['petstore_auth']) {
|
if (!this.credentials['petstore_auth']) {
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
|
"strictNullChecks": true,
|
||||||
|
"exactOptionalPropertyTypes": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"noLib": false,
|
"noLib": false,
|
||||||
|
@ -68,11 +68,12 @@ export class DefaultService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/`;
|
let localVarPath = `/`;
|
||||||
return this.httpClient.request<Fruit>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Fruit>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -122,12 +123,13 @@ export class DefaultService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/`;
|
let localVarPath = `/`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -66,26 +66,30 @@ export class Configuration {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -87,12 +87,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -144,11 +145,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -205,12 +207,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByStatus`;
|
let localVarPath = `/pet/findByStatus`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -268,12 +271,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByTags`;
|
let localVarPath = `/pet/findByTags`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -324,11 +328,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Pet>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -386,12 +391,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -463,12 +469,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -544,12 +551,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
||||||
return this.httpClient.request<ApiResponse>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<ApiResponse>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -73,11 +73,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -123,11 +124,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/inventory`;
|
let localVarPath = `/store/inventory`;
|
||||||
return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<{ [key: string]: number; }>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -175,11 +177,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Order>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -234,12 +237,13 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order`;
|
let localVarPath = `/store/order`;
|
||||||
return this.httpClient.request<Order>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -81,12 +81,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user`;
|
let localVarPath = `/user`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -139,12 +140,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithArray`;
|
let localVarPath = `/user/createWithArray`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -197,12 +199,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithList`;
|
let localVarPath = `/user/createWithList`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -248,11 +251,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -299,11 +303,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<User>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<User>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -360,12 +365,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/login`;
|
let localVarPath = `/user/login`;
|
||||||
return this.httpClient.request<string>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<string>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -406,11 +412,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/logout`;
|
let localVarPath = `/user/logout`;
|
||||||
return this.httpClient.request<any>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -468,12 +475,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: body,
|
body: body,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -66,26 +66,30 @@ export class Configuration {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
|
|
||||||
// init default petstore_auth credential
|
// init default petstore_auth credential
|
||||||
if (!this.credentials['petstore_auth']) {
|
if (!this.credentials['petstore_auth']) {
|
||||||
|
@ -90,12 +90,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -148,11 +149,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -209,12 +211,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByStatus`;
|
let localVarPath = `/pet/findByStatus`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -272,12 +275,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByTags`;
|
let localVarPath = `/pet/findByTags`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -328,11 +332,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Pet>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -393,12 +398,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -471,12 +477,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -553,12 +560,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
||||||
return this.httpClient.request<ApiResponse>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<ApiResponse>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -73,11 +73,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -123,11 +124,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/inventory`;
|
let localVarPath = `/store/inventory`;
|
||||||
return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<{ [key: string]: number; }>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -175,11 +177,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Order>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -236,12 +239,13 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order`;
|
let localVarPath = `/store/order`;
|
||||||
return this.httpClient.request<Order>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: order,
|
body: order,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -85,12 +85,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user`;
|
let localVarPath = `/user`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -148,12 +149,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithArray`;
|
let localVarPath = `/user/createWithArray`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -211,12 +213,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithList`;
|
let localVarPath = `/user/createWithList`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -265,11 +268,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -317,11 +321,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<User>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<User>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -379,12 +384,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/login`;
|
let localVarPath = `/user/login`;
|
||||||
return this.httpClient.request<string>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<string>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -429,11 +435,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/logout`;
|
let localVarPath = `/user/logout`;
|
||||||
return this.httpClient.request<any>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -495,12 +502,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -66,26 +66,30 @@ export class Configuration {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
|
|
||||||
// init default petstore_auth credential
|
// init default petstore_auth credential
|
||||||
if (!this.credentials['petstore_auth']) {
|
if (!this.credentials['petstore_auth']) {
|
||||||
|
@ -90,12 +90,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -148,11 +149,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -209,12 +211,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByStatus`;
|
let localVarPath = `/pet/findByStatus`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -272,12 +275,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByTags`;
|
let localVarPath = `/pet/findByTags`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -328,11 +332,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Pet>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -393,12 +398,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -471,12 +477,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -553,12 +560,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
||||||
return this.httpClient.request<ApiResponse>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<ApiResponse>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -73,11 +73,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -123,11 +124,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/inventory`;
|
let localVarPath = `/store/inventory`;
|
||||||
return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<{ [key: string]: number; }>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -175,11 +177,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Order>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -236,12 +239,13 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order`;
|
let localVarPath = `/store/order`;
|
||||||
return this.httpClient.request<Order>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: order,
|
body: order,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -85,12 +85,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user`;
|
let localVarPath = `/user`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -148,12 +149,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithArray`;
|
let localVarPath = `/user/createWithArray`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -211,12 +213,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithList`;
|
let localVarPath = `/user/createWithList`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -265,11 +268,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -317,11 +321,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<User>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<User>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -379,12 +384,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/login`;
|
let localVarPath = `/user/login`;
|
||||||
return this.httpClient.request<string>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<string>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -429,11 +435,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/logout`;
|
let localVarPath = `/user/logout`;
|
||||||
return this.httpClient.request<any>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -495,12 +502,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -66,26 +66,30 @@ export class Configuration {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
|
|
||||||
// init default petstore_auth credential
|
// init default petstore_auth credential
|
||||||
if (!this.credentials['petstore_auth']) {
|
if (!this.credentials['petstore_auth']) {
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
"module": "es6",
|
"module": "es6",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
|
"strictNullChecks": true,
|
||||||
|
"exactOptionalPropertyTypes": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"noLib": false,
|
"noLib": false,
|
||||||
|
@ -90,12 +90,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -148,11 +149,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -209,12 +211,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByStatus`;
|
let localVarPath = `/pet/findByStatus`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -272,12 +275,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByTags`;
|
let localVarPath = `/pet/findByTags`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -328,11 +332,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Pet>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -393,12 +398,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -471,12 +477,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -553,12 +560,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
||||||
return this.httpClient.request<ApiResponse>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<ApiResponse>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -73,11 +73,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -123,11 +124,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/inventory`;
|
let localVarPath = `/store/inventory`;
|
||||||
return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<{ [key: string]: number; }>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -175,11 +177,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Order>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -236,12 +239,13 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order`;
|
let localVarPath = `/store/order`;
|
||||||
return this.httpClient.request<Order>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: order,
|
body: order,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -85,12 +85,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user`;
|
let localVarPath = `/user`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -148,12 +149,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithArray`;
|
let localVarPath = `/user/createWithArray`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -211,12 +213,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithList`;
|
let localVarPath = `/user/createWithList`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -265,11 +268,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -317,11 +321,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<User>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<User>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -379,12 +384,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/login`;
|
let localVarPath = `/user/login`;
|
||||||
return this.httpClient.request<string>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<string>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -429,11 +435,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/logout`;
|
let localVarPath = `/user/logout`;
|
||||||
return this.httpClient.request<any>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -495,12 +502,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -66,26 +66,30 @@ export class Configuration {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
|
|
||||||
// init default petstore_auth credential
|
// init default petstore_auth credential
|
||||||
if (!this.credentials['petstore_auth']) {
|
if (!this.credentials['petstore_auth']) {
|
||||||
|
@ -90,12 +90,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -148,11 +149,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -209,12 +211,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByStatus`;
|
let localVarPath = `/pet/findByStatus`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -272,12 +275,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByTags`;
|
let localVarPath = `/pet/findByTags`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -328,11 +332,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Pet>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -393,12 +398,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -471,12 +477,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -553,12 +560,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
||||||
return this.httpClient.request<ApiResponse>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<ApiResponse>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -73,11 +73,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -123,11 +124,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/inventory`;
|
let localVarPath = `/store/inventory`;
|
||||||
return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<{ [key: string]: number; }>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -175,11 +177,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Order>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -236,12 +239,13 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order`;
|
let localVarPath = `/store/order`;
|
||||||
return this.httpClient.request<Order>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: order,
|
body: order,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -85,12 +85,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user`;
|
let localVarPath = `/user`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -148,12 +149,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithArray`;
|
let localVarPath = `/user/createWithArray`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -211,12 +213,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithList`;
|
let localVarPath = `/user/createWithList`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -265,11 +268,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -317,11 +321,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<User>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<User>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -379,12 +384,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/login`;
|
let localVarPath = `/user/login`;
|
||||||
return this.httpClient.request<string>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<string>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -429,11 +435,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/logout`;
|
let localVarPath = `/user/logout`;
|
||||||
return this.httpClient.request<any>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -495,12 +502,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -66,26 +66,30 @@ export class Configuration {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
|
|
||||||
// init default petstore_auth credential
|
// init default petstore_auth credential
|
||||||
if (!this.credentials['petstore_auth']) {
|
if (!this.credentials['petstore_auth']) {
|
||||||
|
@ -90,12 +90,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -148,11 +149,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -209,12 +211,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByStatus`;
|
let localVarPath = `/pet/findByStatus`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -272,12 +275,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByTags`;
|
let localVarPath = `/pet/findByTags`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -328,11 +332,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Pet>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -393,12 +398,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -471,12 +477,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -553,12 +560,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
||||||
return this.httpClient.request<ApiResponse>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<ApiResponse>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -73,11 +73,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -123,11 +124,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/inventory`;
|
let localVarPath = `/store/inventory`;
|
||||||
return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<{ [key: string]: number; }>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -175,11 +177,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Order>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -236,12 +239,13 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order`;
|
let localVarPath = `/store/order`;
|
||||||
return this.httpClient.request<Order>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: order,
|
body: order,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -85,12 +85,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user`;
|
let localVarPath = `/user`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -148,12 +149,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithArray`;
|
let localVarPath = `/user/createWithArray`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -211,12 +213,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithList`;
|
let localVarPath = `/user/createWithList`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -265,11 +268,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -317,11 +321,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<User>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<User>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -379,12 +384,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/login`;
|
let localVarPath = `/user/login`;
|
||||||
return this.httpClient.request<string>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<string>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -429,11 +435,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/logout`;
|
let localVarPath = `/user/logout`;
|
||||||
return this.httpClient.request<any>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -495,12 +502,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -66,26 +66,30 @@ export class Configuration {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
|
|
||||||
// init default petstore_auth credential
|
// init default petstore_auth credential
|
||||||
if (!this.credentials['petstore_auth']) {
|
if (!this.credentials['petstore_auth']) {
|
||||||
|
@ -90,12 +90,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -148,11 +149,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -209,12 +211,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByStatus`;
|
let localVarPath = `/pet/findByStatus`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -272,12 +275,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByTags`;
|
let localVarPath = `/pet/findByTags`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -328,11 +332,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Pet>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -393,12 +398,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -471,12 +477,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -553,12 +560,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
||||||
return this.httpClient.request<ApiResponse>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<ApiResponse>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -73,11 +73,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -123,11 +124,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/inventory`;
|
let localVarPath = `/store/inventory`;
|
||||||
return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<{ [key: string]: number; }>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -175,11 +177,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Order>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -236,12 +239,13 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order`;
|
let localVarPath = `/store/order`;
|
||||||
return this.httpClient.request<Order>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: order,
|
body: order,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -85,12 +85,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user`;
|
let localVarPath = `/user`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -148,12 +149,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithArray`;
|
let localVarPath = `/user/createWithArray`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -211,12 +213,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithList`;
|
let localVarPath = `/user/createWithList`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -265,11 +268,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -317,11 +321,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<User>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<User>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -379,12 +384,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/login`;
|
let localVarPath = `/user/login`;
|
||||||
return this.httpClient.request<string>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<string>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -429,11 +435,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/logout`;
|
let localVarPath = `/user/logout`;
|
||||||
return this.httpClient.request<any>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
@ -495,12 +502,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
|
@ -66,26 +66,30 @@ export class Configuration {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
|
|
||||||
// init default petstore_auth credential
|
// init default petstore_auth credential
|
||||||
if (!this.credentials['petstore_auth']) {
|
if (!this.credentials['petstore_auth']) {
|
||||||
|
@ -92,12 +92,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -153,11 +154,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -217,12 +219,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByStatus`;
|
let localVarPath = `/pet/findByStatus`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -283,12 +286,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByTags`;
|
let localVarPath = `/pet/findByTags`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -342,11 +346,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Pet>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -410,12 +415,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -491,12 +497,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -576,12 +583,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
||||||
return this.httpClient.request<ApiResponse>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<ApiResponse>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
|
@ -75,11 +75,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -128,11 +129,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/inventory`;
|
let localVarPath = `/store/inventory`;
|
||||||
return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<{ [key: string]: number; }>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -183,11 +185,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Order>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -247,12 +250,13 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order`;
|
let localVarPath = `/store/order`;
|
||||||
return this.httpClient.request<Order>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: order,
|
body: order,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
|
@ -87,12 +87,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user`;
|
let localVarPath = `/user`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -153,12 +154,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithArray`;
|
let localVarPath = `/user/createWithArray`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -219,12 +221,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithList`;
|
let localVarPath = `/user/createWithList`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -276,11 +279,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -331,11 +335,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<User>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<User>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -396,12 +401,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/login`;
|
let localVarPath = `/user/login`;
|
||||||
return this.httpClient.request<string>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<string>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -449,11 +455,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/logout`;
|
let localVarPath = `/user/logout`;
|
||||||
return this.httpClient.request<any>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -518,12 +525,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
|
@ -66,26 +66,30 @@ export class Configuration {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
|
|
||||||
// init default petstore_auth credential
|
// init default petstore_auth credential
|
||||||
if (!this.credentials['petstore_auth']) {
|
if (!this.credentials['petstore_auth']) {
|
||||||
|
@ -92,12 +92,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -153,11 +154,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -217,12 +219,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByStatus`;
|
let localVarPath = `/pet/findByStatus`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -283,12 +286,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByTags`;
|
let localVarPath = `/pet/findByTags`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -342,11 +346,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Pet>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -410,12 +415,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -491,12 +497,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -576,12 +583,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
||||||
return this.httpClient.request<ApiResponse>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<ApiResponse>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
|
@ -75,11 +75,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -128,11 +129,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/inventory`;
|
let localVarPath = `/store/inventory`;
|
||||||
return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<{ [key: string]: number; }>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -183,11 +185,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Order>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -247,12 +250,13 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order`;
|
let localVarPath = `/store/order`;
|
||||||
return this.httpClient.request<Order>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: order,
|
body: order,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
|
@ -87,12 +87,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user`;
|
let localVarPath = `/user`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -153,12 +154,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithArray`;
|
let localVarPath = `/user/createWithArray`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -219,12 +221,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithList`;
|
let localVarPath = `/user/createWithList`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -276,11 +279,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -331,11 +335,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<User>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<User>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -396,12 +401,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/login`;
|
let localVarPath = `/user/login`;
|
||||||
return this.httpClient.request<string>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<string>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -449,11 +455,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/logout`;
|
let localVarPath = `/user/logout`;
|
||||||
return this.httpClient.request<any>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -518,12 +525,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
|
@ -66,26 +66,30 @@ export class Configuration {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
|
|
||||||
// init default petstore_auth credential
|
// init default petstore_auth credential
|
||||||
if (!this.credentials['petstore_auth']) {
|
if (!this.credentials['petstore_auth']) {
|
||||||
|
@ -92,12 +92,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -153,11 +154,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -217,12 +219,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByStatus`;
|
let localVarPath = `/pet/findByStatus`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -283,12 +286,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByTags`;
|
let localVarPath = `/pet/findByTags`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -342,11 +346,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Pet>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -410,12 +415,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -491,12 +497,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -576,12 +583,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
||||||
return this.httpClient.request<ApiResponse>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<ApiResponse>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
|
@ -75,11 +75,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -128,11 +129,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/inventory`;
|
let localVarPath = `/store/inventory`;
|
||||||
return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<{ [key: string]: number; }>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -183,11 +185,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Order>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -247,12 +250,13 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order`;
|
let localVarPath = `/store/order`;
|
||||||
return this.httpClient.request<Order>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: order,
|
body: order,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
|
@ -87,12 +87,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user`;
|
let localVarPath = `/user`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -153,12 +154,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithArray`;
|
let localVarPath = `/user/createWithArray`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -219,12 +221,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithList`;
|
let localVarPath = `/user/createWithList`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -276,11 +279,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -331,11 +335,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<User>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<User>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -396,12 +401,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/login`;
|
let localVarPath = `/user/login`;
|
||||||
return this.httpClient.request<string>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<string>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -449,11 +455,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/logout`;
|
let localVarPath = `/user/logout`;
|
||||||
return this.httpClient.request<any>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -518,12 +525,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
|
@ -66,26 +66,30 @@ export class Configuration {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
|
|
||||||
// init default petstore_auth credential
|
// init default petstore_auth credential
|
||||||
if (!this.credentials['petstore_auth']) {
|
if (!this.credentials['petstore_auth']) {
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
"module": "es6",
|
"module": "es6",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
|
"strictNullChecks": true,
|
||||||
|
"exactOptionalPropertyTypes": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"noLib": false,
|
"noLib": false,
|
||||||
|
@ -92,12 +92,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -153,11 +154,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -217,12 +219,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByStatus`;
|
let localVarPath = `/pet/findByStatus`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -283,12 +286,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/findByTags`;
|
let localVarPath = `/pet/findByTags`;
|
||||||
return this.httpClient.request<Array<Pet>>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<Pet>>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -342,11 +346,12 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Pet>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -410,12 +415,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet`;
|
let localVarPath = `/pet`;
|
||||||
return this.httpClient.request<Pet>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Pet>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: pet,
|
body: pet,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -491,12 +497,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -576,12 +583,13 @@ export class PetService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`;
|
||||||
return this.httpClient.request<ApiResponse>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<ApiResponse>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
|
@ -75,11 +75,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -128,11 +129,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/inventory`;
|
let localVarPath = `/store/inventory`;
|
||||||
return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<{ [key: string]: number; }>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -183,11 +185,12 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`;
|
||||||
return this.httpClient.request<Order>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -247,12 +250,13 @@ export class StoreService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/store/order`;
|
let localVarPath = `/store/order`;
|
||||||
return this.httpClient.request<Order>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Order>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: order,
|
body: order,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
|
@ -87,12 +87,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user`;
|
let localVarPath = `/user`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -153,12 +154,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithArray`;
|
let localVarPath = `/user/createWithArray`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -219,12 +221,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/createWithList`;
|
let localVarPath = `/user/createWithList`;
|
||||||
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -276,11 +279,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -331,11 +335,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<User>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<User>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -396,12 +401,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/login`;
|
let localVarPath = `/user/login`;
|
||||||
return this.httpClient.request<string>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<string>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
params: localVarQueryParameters,
|
params: localVarQueryParameters,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -449,11 +455,12 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/logout`;
|
let localVarPath = `/user/logout`;
|
||||||
return this.httpClient.request<any>('get', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('get', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
@ -518,12 +525,13 @@ export class UserService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||||
return this.httpClient.request<any>('put', `${this.configuration.basePath}${localVarPath}`,
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: user,
|
body: user,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
withCredentials: this.configuration.withCredentials,
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
observe: observe,
|
observe: observe,
|
||||||
transferCache: localVarTransferCache,
|
transferCache: localVarTransferCache,
|
||||||
|
@ -66,26 +66,30 @@ export class Configuration {
|
|||||||
*/
|
*/
|
||||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||||
|
|
||||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||||
this.apiKeys = configurationParameters.apiKeys;
|
if (apiKeys) {
|
||||||
this.username = configurationParameters.username;
|
this.apiKeys = apiKeys;
|
||||||
this.password = configurationParameters.password;
|
|
||||||
this.accessToken = configurationParameters.accessToken;
|
|
||||||
this.basePath = configurationParameters.basePath;
|
|
||||||
this.withCredentials = configurationParameters.withCredentials;
|
|
||||||
this.encoder = configurationParameters.encoder;
|
|
||||||
if (configurationParameters.encodeParam) {
|
|
||||||
this.encodeParam = configurationParameters.encodeParam;
|
|
||||||
}
|
}
|
||||||
else {
|
if (username !== undefined) {
|
||||||
this.encodeParam = param => this.defaultEncodeParam(param);
|
this.username = username;
|
||||||
}
|
}
|
||||||
if (configurationParameters.credentials) {
|
if (password !== undefined) {
|
||||||
this.credentials = configurationParameters.credentials;
|
this.password = password;
|
||||||
}
|
}
|
||||||
else {
|
if (accessToken !== undefined) {
|
||||||
this.credentials = {};
|
this.accessToken = accessToken;
|
||||||
}
|
}
|
||||||
|
if (basePath !== undefined) {
|
||||||
|
this.basePath = basePath;
|
||||||
|
}
|
||||||
|
if (withCredentials !== undefined) {
|
||||||
|
this.withCredentials = withCredentials;
|
||||||
|
}
|
||||||
|
if (encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||||
|
this.credentials = credentials ?? {};
|
||||||
|
|
||||||
// init default petstore_auth credential
|
// init default petstore_auth credential
|
||||||
if (!this.credentials['petstore_auth']) {
|
if (!this.credentials['petstore_auth']) {
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
"module": "es6",
|
"module": "es6",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
|
"strictNullChecks": true,
|
||||||
|
"exactOptionalPropertyTypes": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"noLib": false,
|
"noLib": false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user