mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-02-21 22:50:56 +00:00
Compare commits
1 Commits
python-ser
...
revert-217
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b97b9a804 |
@@ -42,20 +42,6 @@ export interface {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterIn
|
||||
*/
|
||||
export interface {{classname}}Interface {
|
||||
{{#operation}}
|
||||
/**
|
||||
* Creates request options for {{nickname}} without sending the request
|
||||
{{#allParams}}
|
||||
* @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
|
||||
{{/allParams}}
|
||||
* @param {*} [options] Override http request option.
|
||||
{{#isDeprecated}}
|
||||
* @deprecated
|
||||
{{/isDeprecated}}
|
||||
* @throws {RequiredError}
|
||||
* @memberof {{classname}}Interface
|
||||
*/
|
||||
{{nickname}}RequestOpts({{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request, {{/allParams.0}}initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
* {{¬es}}
|
||||
{{#summary}}
|
||||
@@ -109,12 +95,17 @@ export class {{classname}} extends runtime.BaseAPI {
|
||||
|
||||
{{#operation}}
|
||||
/**
|
||||
* Creates request options for {{nickname}} without sending the request
|
||||
{{#notes}}
|
||||
* {{¬es}}
|
||||
{{/notes}}
|
||||
{{#summary}}
|
||||
* {{&summary}}
|
||||
{{/summary}}
|
||||
{{#isDeprecated}}
|
||||
* @deprecated
|
||||
{{/isDeprecated}}
|
||||
*/
|
||||
async {{nickname}}RequestOpts({{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request, {{/allParams.0}}initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async {{nickname}}Raw({{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request, {{/allParams.0}}initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{{{returnType}}}{{^returnType}}void{{/returnType}}>> {
|
||||
{{#allParams}}
|
||||
{{#required}}
|
||||
if (requestParameters['{{paramName}}'] == null) {
|
||||
@@ -313,7 +304,7 @@ export class {{classname}} extends runtime.BaseAPI {
|
||||
{{/isDateTimeType}}
|
||||
{{/pathParams}}
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: '{{httpMethod}}',
|
||||
headers: headerParameters,
|
||||
@@ -346,23 +337,7 @@ export class {{classname}} extends runtime.BaseAPI {
|
||||
{{#hasFormParams}}
|
||||
body: formParams,
|
||||
{{/hasFormParams}}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
{{#notes}}
|
||||
* {{¬es}}
|
||||
{{/notes}}
|
||||
{{#summary}}
|
||||
* {{&summary}}
|
||||
{{/summary}}
|
||||
{{#isDeprecated}}
|
||||
* @deprecated
|
||||
{{/isDeprecated}}
|
||||
*/
|
||||
async {{nickname}}Raw({{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request, {{/allParams.0}}initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{{{returnType}}}{{^returnType}}void{{/returnType}}>> {
|
||||
const requestConfig = await this.{{nickname}}RequestConfig({{#allParams.0}}requestParameters, {{/allParams.0}}initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
{{#returnType}}
|
||||
{{#isResponseFile}}
|
||||
|
||||
@@ -32,9 +32,8 @@ export interface ListRequest {
|
||||
export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for list without sending the request
|
||||
*/
|
||||
async listRequestOpts(requestParameters: ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async listRaw(requestParameters: ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Club>> {
|
||||
if (requestParameters['personId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'personId',
|
||||
@@ -50,19 +49,12 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
let urlPath = `/person/display/{personId}`;
|
||||
urlPath = urlPath.replace(`{${"personId"}}`, encodeURIComponent(String(requestParameters['personId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async listRaw(requestParameters: ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Club>> {
|
||||
const requestConfig = await this.listRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ClubFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -32,9 +32,8 @@ export interface ListRequest {
|
||||
export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for list without sending the request
|
||||
*/
|
||||
async listRequestOpts(requestParameters: ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async listRaw(requestParameters: ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Club>> {
|
||||
if (requestParameters['personId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'personId',
|
||||
@@ -50,19 +49,12 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
let urlPath = `/person/display/{personId}`;
|
||||
urlPath = urlPath.replace(`{${"personId"}}`, encodeURIComponent(String(requestParameters['personId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async listRaw(requestParameters: ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Club>> {
|
||||
const requestConfig = await this.listRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ClubFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -32,9 +32,10 @@ export interface 123testSpecialTagsRequest {
|
||||
export class AnotherFakeApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for _123testSpecialTags without sending the request
|
||||
* To test special tags and operation ID starting with number
|
||||
* To test special tags
|
||||
*/
|
||||
async _123testSpecialTagsRequestOpts(requestParameters: 123testSpecialTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async _123testSpecialTagsRaw(requestParameters: 123testSpecialTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Client>> {
|
||||
if (requestParameters['client'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'client',
|
||||
@@ -51,22 +52,13 @@ export class AnotherFakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/another-fake/dummy`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ClientToJSON(requestParameters['client']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags and operation ID starting with number
|
||||
* To test special tags
|
||||
*/
|
||||
async _123testSpecialTagsRaw(requestParameters: 123testSpecialTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Client>> {
|
||||
const requestConfig = await this._123testSpecialTagsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ClientFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -28,9 +28,8 @@ import {
|
||||
export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for fooGet without sending the request
|
||||
*/
|
||||
async fooGetRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fooGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FooGetDefaultResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -38,19 +37,12 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/foo`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async fooGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FooGetDefaultResponse>> {
|
||||
const requestConfig = await this.fooGetRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => FooGetDefaultResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -174,9 +174,9 @@ export interface TestStringMapReferenceRequest {
|
||||
export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for fakeBigDecimalMap without sending the request
|
||||
* for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys
|
||||
*/
|
||||
async fakeBigDecimalMapRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeBigDecimalMapRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FakeBigDecimalMap200Response>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -184,20 +184,12 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/BigDecimalMap`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys
|
||||
*/
|
||||
async fakeBigDecimalMapRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FakeBigDecimalMap200Response>> {
|
||||
const requestConfig = await this.fakeBigDecimalMapRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => FakeBigDecimalMap200ResponseFromJSON(jsonValue));
|
||||
}
|
||||
@@ -211,9 +203,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakeHealthGet without sending the request
|
||||
* Health check endpoint
|
||||
*/
|
||||
async fakeHealthGetRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeHealthGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HealthCheckResult>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -221,20 +213,12 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/health`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Health check endpoint
|
||||
*/
|
||||
async fakeHealthGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HealthCheckResult>> {
|
||||
const requestConfig = await this.fakeHealthGetRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => HealthCheckResultFromJSON(jsonValue));
|
||||
}
|
||||
@@ -248,9 +232,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakeHttpSignatureTest without sending the request
|
||||
* test http signature authentication
|
||||
*/
|
||||
async fakeHttpSignatureTestRequestOpts(requestParameters: FakeHttpSignatureTestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeHttpSignatureTestRaw(requestParameters: FakeHttpSignatureTestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['pet'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'pet',
|
||||
@@ -275,21 +259,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/http-signature-test`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['pet']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* test http signature authentication
|
||||
*/
|
||||
async fakeHttpSignatureTestRaw(requestParameters: FakeHttpSignatureTestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.fakeHttpSignatureTestRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -302,9 +278,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakeOuterBooleanSerialize without sending the request
|
||||
* Test serialization of outer boolean types
|
||||
*/
|
||||
async fakeOuterBooleanSerializeRequestOpts(requestParameters: FakeOuterBooleanSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeOuterBooleanSerializeRaw(requestParameters: FakeOuterBooleanSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -314,21 +290,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/outer/boolean`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body'] as any,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Test serialization of outer boolean types
|
||||
*/
|
||||
async fakeOuterBooleanSerializeRaw(requestParameters: FakeOuterBooleanSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>> {
|
||||
const requestConfig = await this.fakeOuterBooleanSerializeRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse<boolean>(response);
|
||||
@@ -346,9 +314,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakeOuterCompositeSerialize without sending the request
|
||||
* Test serialization of object with outer number type
|
||||
*/
|
||||
async fakeOuterCompositeSerializeRequestOpts(requestParameters: FakeOuterCompositeSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeOuterCompositeSerializeRaw(requestParameters: FakeOuterCompositeSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OuterComposite>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -358,21 +326,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/outer/composite`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: OuterCompositeToJSON(requestParameters['outerComposite']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Test serialization of object with outer number type
|
||||
*/
|
||||
async fakeOuterCompositeSerializeRaw(requestParameters: FakeOuterCompositeSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OuterComposite>> {
|
||||
const requestConfig = await this.fakeOuterCompositeSerializeRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OuterCompositeFromJSON(jsonValue));
|
||||
}
|
||||
@@ -386,9 +346,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakeOuterNumberSerialize without sending the request
|
||||
* Test serialization of outer number types
|
||||
*/
|
||||
async fakeOuterNumberSerializeRequestOpts(requestParameters: FakeOuterNumberSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeOuterNumberSerializeRaw(requestParameters: FakeOuterNumberSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<number>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -398,21 +358,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/outer/number`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body'] as any,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Test serialization of outer number types
|
||||
*/
|
||||
async fakeOuterNumberSerializeRaw(requestParameters: FakeOuterNumberSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<number>> {
|
||||
const requestConfig = await this.fakeOuterNumberSerializeRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse<number>(response);
|
||||
@@ -430,9 +382,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakeOuterStringSerialize without sending the request
|
||||
* Test serialization of outer string types
|
||||
*/
|
||||
async fakeOuterStringSerializeRequestOpts(requestParameters: FakeOuterStringSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeOuterStringSerializeRaw(requestParameters: FakeOuterStringSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -442,21 +394,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/outer/string`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body'] as any,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Test serialization of outer string types
|
||||
*/
|
||||
async fakeOuterStringSerializeRaw(requestParameters: FakeOuterStringSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
const requestConfig = await this.fakeOuterStringSerializeRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
@@ -474,9 +418,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakePropertyEnumIntegerSerialize without sending the request
|
||||
* Test serialization of enum (int) properties with examples
|
||||
*/
|
||||
async fakePropertyEnumIntegerSerializeRequestOpts(requestParameters: FakePropertyEnumIntegerSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakePropertyEnumIntegerSerializeRaw(requestParameters: FakePropertyEnumIntegerSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OuterObjectWithEnumProperty>> {
|
||||
if (requestParameters['outerObjectWithEnumProperty'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'outerObjectWithEnumProperty',
|
||||
@@ -493,21 +437,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/property/enum-int`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: OuterObjectWithEnumPropertyToJSON(requestParameters['outerObjectWithEnumProperty']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Test serialization of enum (int) properties with examples
|
||||
*/
|
||||
async fakePropertyEnumIntegerSerializeRaw(requestParameters: FakePropertyEnumIntegerSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OuterObjectWithEnumProperty>> {
|
||||
const requestConfig = await this.fakePropertyEnumIntegerSerializeRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OuterObjectWithEnumPropertyFromJSON(jsonValue));
|
||||
}
|
||||
@@ -521,9 +457,10 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testAdditionalPropertiesReference without sending the request
|
||||
*
|
||||
* test referenced additionalProperties
|
||||
*/
|
||||
async testAdditionalPropertiesReferenceRequestOpts(requestParameters: TestAdditionalPropertiesReferenceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testAdditionalPropertiesReferenceRaw(requestParameters: TestAdditionalPropertiesReferenceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['requestBody'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'requestBody',
|
||||
@@ -540,22 +477,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/additionalProperties-reference`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['requestBody'],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* test referenced additionalProperties
|
||||
*/
|
||||
async testAdditionalPropertiesReferenceRaw(requestParameters: TestAdditionalPropertiesReferenceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testAdditionalPropertiesReferenceRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -569,9 +497,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testBodyWithBinary without sending the request
|
||||
* For this test, the body has to be a binary file.
|
||||
*/
|
||||
async testBodyWithBinaryRequestOpts(requestParameters: TestBodyWithBinaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testBodyWithBinaryRaw(requestParameters: TestBodyWithBinaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -588,21 +516,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/body-with-binary`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body'] as any,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For this test, the body has to be a binary file.
|
||||
*/
|
||||
async testBodyWithBinaryRaw(requestParameters: TestBodyWithBinaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testBodyWithBinaryRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -615,9 +535,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testBodyWithFileSchema without sending the request
|
||||
* For this test, the body for this request must reference a schema named `File`.
|
||||
*/
|
||||
async testBodyWithFileSchemaRequestOpts(requestParameters: TestBodyWithFileSchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testBodyWithFileSchemaRaw(requestParameters: TestBodyWithFileSchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['fileSchemaTestClass'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'fileSchemaTestClass',
|
||||
@@ -634,21 +554,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/body-with-file-schema`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: FileSchemaTestClassToJSON(requestParameters['fileSchemaTestClass']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For this test, the body for this request must reference a schema named `File`.
|
||||
*/
|
||||
async testBodyWithFileSchemaRaw(requestParameters: TestBodyWithFileSchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testBodyWithFileSchemaRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -661,9 +573,8 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testBodyWithQueryParams without sending the request
|
||||
*/
|
||||
async testBodyWithQueryParamsRequestOpts(requestParameters: TestBodyWithQueryParamsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testBodyWithQueryParamsRaw(requestParameters: TestBodyWithQueryParamsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['query'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'query',
|
||||
@@ -691,20 +602,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/body-with-query-params`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['user']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async testBodyWithQueryParamsRaw(requestParameters: TestBodyWithQueryParamsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testBodyWithQueryParamsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -716,9 +620,10 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testClientModel without sending the request
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
*/
|
||||
async testClientModelRequestOpts(requestParameters: TestClientModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testClientModelRaw(requestParameters: TestClientModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Client>> {
|
||||
if (requestParameters['client'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'client',
|
||||
@@ -735,22 +640,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ClientToJSON(requestParameters['client']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
*/
|
||||
async testClientModelRaw(requestParameters: TestClientModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Client>> {
|
||||
const requestConfig = await this.testClientModelRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ClientFromJSON(jsonValue));
|
||||
}
|
||||
@@ -765,9 +661,10 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testEndpointParameters without sending the request
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*/
|
||||
async testEndpointParametersRequestOpts(requestParameters: TestEndpointParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testEndpointParametersRaw(requestParameters: TestEndpointParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['number'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'number',
|
||||
@@ -878,22 +775,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*/
|
||||
async testEndpointParametersRaw(requestParameters: TestEndpointParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testEndpointParametersRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -907,9 +795,10 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testEnumParameters without sending the request
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
*/
|
||||
async testEnumParametersRequestOpts(requestParameters: TestEnumParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testEnumParametersRaw(requestParameters: TestEnumParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['enumQueryStringArray'] != null) {
|
||||
@@ -967,22 +856,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
*/
|
||||
async testEnumParametersRaw(requestParameters: TestEnumParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testEnumParametersRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -996,9 +876,10 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testGroupParameters without sending the request
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
*/
|
||||
async testGroupParametersRequestOpts(requestParameters: TestGroupParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testGroupParametersRaw(requestParameters: TestGroupParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['requiredStringGroup'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'requiredStringGroup',
|
||||
@@ -1059,21 +940,12 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
*/
|
||||
async testGroupParametersRaw(requestParameters: TestGroupParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testGroupParametersRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -1087,9 +959,10 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testInlineAdditionalProperties without sending the request
|
||||
*
|
||||
* test inline additionalProperties
|
||||
*/
|
||||
async testInlineAdditionalPropertiesRequestOpts(requestParameters: TestInlineAdditionalPropertiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testInlineAdditionalPropertiesRaw(requestParameters: TestInlineAdditionalPropertiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['requestBody'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'requestBody',
|
||||
@@ -1106,22 +979,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/inline-additionalProperties`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['requestBody'],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* test inline additionalProperties
|
||||
*/
|
||||
async testInlineAdditionalPropertiesRaw(requestParameters: TestInlineAdditionalPropertiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testInlineAdditionalPropertiesRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -1135,9 +999,10 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testInlineFreeformAdditionalProperties without sending the request
|
||||
*
|
||||
* test inline free-form additionalProperties
|
||||
*/
|
||||
async testInlineFreeformAdditionalPropertiesRequestOpts(requestParameters: TestInlineFreeformAdditionalPropertiesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testInlineFreeformAdditionalPropertiesRaw(requestParameters: TestInlineFreeformAdditionalPropertiesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['testInlineFreeformAdditionalPropertiesRequest'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'testInlineFreeformAdditionalPropertiesRequest',
|
||||
@@ -1154,22 +1019,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/inline-freeform-additionalProperties`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: TestInlineFreeformAdditionalPropertiesRequestToJSON(requestParameters['testInlineFreeformAdditionalPropertiesRequest']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* test inline free-form additionalProperties
|
||||
*/
|
||||
async testInlineFreeformAdditionalPropertiesRaw(requestParameters: TestInlineFreeformAdditionalPropertiesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testInlineFreeformAdditionalPropertiesRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -1183,9 +1039,10 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testJsonFormData without sending the request
|
||||
*
|
||||
* test json serialization of form data
|
||||
*/
|
||||
async testJsonFormDataRequestOpts(requestParameters: TestJsonFormDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testJsonFormDataRaw(requestParameters: TestJsonFormDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['param'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'param',
|
||||
@@ -1229,22 +1086,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/jsonFormData`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* test json serialization of form data
|
||||
*/
|
||||
async testJsonFormDataRaw(requestParameters: TestJsonFormDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testJsonFormDataRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -1258,9 +1106,10 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testNullable without sending the request
|
||||
*
|
||||
* test nullable parent property
|
||||
*/
|
||||
async testNullableRequestOpts(requestParameters: TestNullableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testNullableRaw(requestParameters: TestNullableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['childWithNullable'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'childWithNullable',
|
||||
@@ -1277,22 +1126,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/nullable`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ChildWithNullableToJSON(requestParameters['childWithNullable']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* test nullable parent property
|
||||
*/
|
||||
async testNullableRaw(requestParameters: TestNullableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testNullableRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -1306,9 +1146,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testQueryParameterCollectionFormat without sending the request
|
||||
* To test the collection format in query parameters
|
||||
*/
|
||||
async testQueryParameterCollectionFormatRequestOpts(requestParameters: TestQueryParameterCollectionFormatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testQueryParameterCollectionFormatRaw(requestParameters: TestQueryParameterCollectionFormatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['pipe'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'pipe',
|
||||
@@ -1388,20 +1228,12 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/test-query-parameters`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* To test the collection format in query parameters
|
||||
*/
|
||||
async testQueryParameterCollectionFormatRaw(requestParameters: TestQueryParameterCollectionFormatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testQueryParameterCollectionFormatRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -1414,9 +1246,10 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testStringMapReference without sending the request
|
||||
*
|
||||
* test referenced string map
|
||||
*/
|
||||
async testStringMapReferenceRequestOpts(requestParameters: TestStringMapReferenceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testStringMapReferenceRaw(requestParameters: TestStringMapReferenceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['requestBody'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'requestBody',
|
||||
@@ -1433,22 +1266,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/stringMap-reference`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['requestBody'],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* test referenced string map
|
||||
*/
|
||||
async testStringMapReferenceRaw(requestParameters: TestStringMapReferenceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testStringMapReferenceRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
@@ -32,9 +32,10 @@ export interface TestClassnameRequest {
|
||||
export class FakeClassnameTags123Api extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for testClassname without sending the request
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
*/
|
||||
async testClassnameRequestOpts(requestParameters: TestClassnameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testClassnameRaw(requestParameters: TestClassnameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Client>> {
|
||||
if (requestParameters['client'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'client',
|
||||
@@ -55,22 +56,13 @@ export class FakeClassnameTags123Api extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake_classname_test`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ClientToJSON(requestParameters['client']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
*/
|
||||
async testClassnameRaw(requestParameters: TestClassnameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Client>> {
|
||||
const requestConfig = await this.testClassnameRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ClientFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -74,9 +74,10 @@ export interface UploadFileWithRequiredFileRequest {
|
||||
export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for addPet without sending the request
|
||||
*
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRequestOpts(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['pet'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'pet',
|
||||
@@ -98,22 +99,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['pet']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.addPetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -127,9 +119,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deletePet without sending the request
|
||||
*
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRequestOpts(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -154,21 +147,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deletePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -182,9 +166,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByStatus without sending the request
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRequestOpts(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['status'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'status',
|
||||
@@ -208,21 +193,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByStatus`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByStatusRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
@@ -237,10 +213,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByTags without sending the request
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRequestOpts(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Set<Pet>>> {
|
||||
if (requestParameters['tags'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'tags',
|
||||
@@ -264,22 +241,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByTags`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Set<Pet>>> {
|
||||
const requestConfig = await this.findPetsByTagsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => new Set(jsonValue.map(PetFromJSON)));
|
||||
}
|
||||
@@ -295,9 +262,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getPetById without sending the request
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRequestOpts(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -317,21 +285,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
const requestConfig = await this.getPetByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => PetFromJSON(jsonValue));
|
||||
}
|
||||
@@ -346,9 +305,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePet without sending the request
|
||||
*
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRequestOpts(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['pet'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'pet',
|
||||
@@ -370,22 +330,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['pet']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -399,9 +350,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePetWithForm without sending the request
|
||||
*
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRequestOpts(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -444,22 +396,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetWithFormRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -473,9 +416,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for uploadFile without sending the request
|
||||
*
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRequestOpts(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -520,22 +464,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}/uploadImage`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
const requestConfig = await this.uploadFileRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ModelApiResponseFromJSON(jsonValue));
|
||||
}
|
||||
@@ -550,9 +485,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for uploadFileWithRequiredFile without sending the request
|
||||
*
|
||||
* uploads an image (required)
|
||||
*/
|
||||
async uploadFileWithRequiredFileRequestOpts(requestParameters: UploadFileWithRequiredFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async uploadFileWithRequiredFileRaw(requestParameters: UploadFileWithRequiredFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -604,22 +540,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/fake/{petId}/uploadImageWithRequiredFile`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* uploads an image (required)
|
||||
*/
|
||||
async uploadFileWithRequiredFileRaw(requestParameters: UploadFileWithRequiredFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
const requestConfig = await this.uploadFileWithRequiredFileRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ModelApiResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -40,9 +40,10 @@ export interface PlaceOrderRequest {
|
||||
export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for deleteOrder without sending the request
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRequestOpts(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -58,21 +59,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{order_id}`;
|
||||
urlPath = urlPath.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -86,9 +78,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getInventory without sending the request
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -100,21 +93,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/inventory`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const requestConfig = await this.getInventoryRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
@@ -129,9 +113,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getOrderById without sending the request
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRequestOpts(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -147,21 +132,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{order_id}`;
|
||||
urlPath = urlPath.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.getOrderByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
@@ -176,9 +152,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for placeOrder without sending the request
|
||||
*
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRequestOpts(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['order'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'order',
|
||||
@@ -195,22 +172,13 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/order`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: OrderToJSON(requestParameters['order']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.placeOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -58,9 +58,10 @@ export interface UpdateUserRequest {
|
||||
export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for createUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRequestOpts(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['user'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'user',
|
||||
@@ -77,22 +78,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['user']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -106,9 +98,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithArrayInput without sending the request
|
||||
*
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRequestOpts(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['user'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'user',
|
||||
@@ -125,22 +118,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithArray`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['user']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithArrayInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -154,9 +138,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithListInput without sending the request
|
||||
*
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRequestOpts(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['user'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'user',
|
||||
@@ -173,22 +158,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithList`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['user']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithListInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -202,9 +178,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deleteUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRequestOpts(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -220,21 +197,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -248,9 +216,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getUserByName without sending the request
|
||||
*
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRequestOpts(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -266,21 +235,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
const requestConfig = await this.getUserByNameRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue));
|
||||
}
|
||||
@@ -295,9 +255,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for loginUser without sending the request
|
||||
*
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRequestOpts(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -327,21 +288,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/login`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
const requestConfig = await this.loginUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
@@ -360,9 +312,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for logoutUser without sending the request
|
||||
*
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -370,21 +323,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/logout`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.logoutUserRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -398,9 +342,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updateUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRequestOpts(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -425,22 +370,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['user']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updateUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
@@ -68,9 +68,9 @@ export interface UploadFileRequest {
|
||||
export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for addPet without sending the request
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRequestOpts(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -92,21 +92,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.addPetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -119,9 +111,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deletePet without sending the request
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRequestOpts(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -146,20 +138,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deletePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -172,9 +156,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByStatus without sending the request
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRequestOpts(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['status'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'status',
|
||||
@@ -198,21 +183,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByStatus`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByStatusRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
@@ -227,10 +203,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByTags without sending the request
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRequestOpts(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['tags'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'tags',
|
||||
@@ -254,22 +231,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByTags`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByTagsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
@@ -285,9 +252,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getPetById without sending the request
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRequestOpts(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -307,21 +275,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
const requestConfig = await this.getPetByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => PetFromJSON(jsonValue));
|
||||
}
|
||||
@@ -336,9 +295,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePet without sending the request
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRequestOpts(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -360,21 +319,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -387,9 +338,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePetWithForm without sending the request
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRequestOpts(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -432,21 +383,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetWithFormRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -459,9 +402,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for uploadFile without sending the request
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRequestOpts(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -506,21 +449,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}/uploadImage`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
const requestConfig = await this.uploadFileRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ModelApiResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -40,9 +40,10 @@ export interface PlaceOrderRequest {
|
||||
export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for deleteOrder without sending the request
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRequestOpts(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -58,21 +59,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{orderId}`;
|
||||
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -86,9 +78,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getInventory without sending the request
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -100,21 +93,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/inventory`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const requestConfig = await this.getInventoryRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
@@ -129,9 +113,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getOrderById without sending the request
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRequestOpts(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -147,21 +132,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{orderId}`;
|
||||
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.getOrderByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
@@ -176,9 +152,9 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for placeOrder without sending the request
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRequestOpts(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -195,21 +171,13 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/order`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: OrderToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.placeOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -58,9 +58,10 @@ export interface UpdateUserRequest {
|
||||
export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for createUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRequestOpts(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -77,22 +78,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -106,9 +98,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithArrayInput without sending the request
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRequestOpts(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -125,21 +117,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithArray`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithArrayInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -152,9 +136,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithListInput without sending the request
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRequestOpts(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -171,21 +155,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithList`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithListInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -198,9 +174,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deleteUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRequestOpts(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -216,21 +193,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -244,9 +212,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getUserByName without sending the request
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRequestOpts(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -262,20 +230,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
const requestConfig = await this.getUserByNameRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue));
|
||||
}
|
||||
@@ -289,9 +249,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for loginUser without sending the request
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRequestOpts(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -321,20 +281,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/login`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
const requestConfig = await this.loginUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
@@ -352,9 +304,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for logoutUser without sending the request
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -362,20 +314,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/logout`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.logoutUserRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -388,9 +332,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updateUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRequestOpts(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -415,22 +360,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updateUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
@@ -59,9 +59,8 @@ export interface FakeEnumRequestPostRefRequest {
|
||||
export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for fakeEnumRequestGetInline without sending the request
|
||||
*/
|
||||
async fakeEnumRequestGetInlineRequestOpts(requestParameters: FakeEnumRequestGetInlineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeEnumRequestGetInlineRaw(requestParameters: FakeEnumRequestGetInlineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FakeEnumRequestGetInline200Response>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['stringEnum'] != null) {
|
||||
@@ -85,19 +84,12 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/enum-request-inline`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async fakeEnumRequestGetInlineRaw(requestParameters: FakeEnumRequestGetInlineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FakeEnumRequestGetInline200Response>> {
|
||||
const requestConfig = await this.fakeEnumRequestGetInlineRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => FakeEnumRequestGetInline200ResponseFromJSON(jsonValue));
|
||||
}
|
||||
@@ -110,9 +102,8 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakeEnumRequestGetRef without sending the request
|
||||
*/
|
||||
async fakeEnumRequestGetRefRequestOpts(requestParameters: FakeEnumRequestGetRefRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeEnumRequestGetRefRaw(requestParameters: FakeEnumRequestGetRefRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EnumPatternObject>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['stringEnum'] != null) {
|
||||
@@ -136,19 +127,12 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/enum-request-ref`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async fakeEnumRequestGetRefRaw(requestParameters: FakeEnumRequestGetRefRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EnumPatternObject>> {
|
||||
const requestConfig = await this.fakeEnumRequestGetRefRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => EnumPatternObjectFromJSON(jsonValue));
|
||||
}
|
||||
@@ -161,9 +145,8 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakeEnumRequestPostInline without sending the request
|
||||
*/
|
||||
async fakeEnumRequestPostInlineRequestOpts(requestParameters: FakeEnumRequestPostInlineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeEnumRequestPostInlineRaw(requestParameters: FakeEnumRequestPostInlineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FakeEnumRequestGetInline200Response>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -173,20 +156,13 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/enum-request-inline`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: FakeEnumRequestGetInline200ResponseToJSON(requestParameters['fakeEnumRequestGetInline200Response']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async fakeEnumRequestPostInlineRaw(requestParameters: FakeEnumRequestPostInlineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FakeEnumRequestGetInline200Response>> {
|
||||
const requestConfig = await this.fakeEnumRequestPostInlineRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => FakeEnumRequestGetInline200ResponseFromJSON(jsonValue));
|
||||
}
|
||||
@@ -199,9 +175,8 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakeEnumRequestPostRef without sending the request
|
||||
*/
|
||||
async fakeEnumRequestPostRefRequestOpts(requestParameters: FakeEnumRequestPostRefRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeEnumRequestPostRefRaw(requestParameters: FakeEnumRequestPostRefRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EnumPatternObject>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -211,20 +186,13 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/enum-request-ref`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: EnumPatternObjectToJSON(requestParameters['enumPatternObject']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async fakeEnumRequestPostRefRaw(requestParameters: FakeEnumRequestPostRefRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EnumPatternObject>> {
|
||||
const requestConfig = await this.fakeEnumRequestPostRefRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => EnumPatternObjectFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -68,9 +68,9 @@ export interface UploadFileRequest {
|
||||
export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for addPet without sending the request
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRequestOpts(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -92,21 +92,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.addPetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -119,9 +111,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deletePet without sending the request
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRequestOpts(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -146,20 +138,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deletePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -172,9 +156,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByStatus without sending the request
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRequestOpts(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['status'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'status',
|
||||
@@ -198,21 +183,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByStatus`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByStatusRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
@@ -227,10 +203,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByTags without sending the request
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRequestOpts(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['tags'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'tags',
|
||||
@@ -254,22 +231,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByTags`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByTagsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
@@ -285,9 +252,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getPetById without sending the request
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRequestOpts(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -307,21 +275,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
const requestConfig = await this.getPetByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => PetFromJSON(jsonValue));
|
||||
}
|
||||
@@ -336,9 +295,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePet without sending the request
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRequestOpts(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -360,21 +319,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -387,9 +338,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePetWithForm without sending the request
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRequestOpts(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -432,21 +383,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetWithFormRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -459,9 +402,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for uploadFile without sending the request
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRequestOpts(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -506,21 +449,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}/uploadImage`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
const requestConfig = await this.uploadFileRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ModelApiResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -40,9 +40,10 @@ export interface PlaceOrderRequest {
|
||||
export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for deleteOrder without sending the request
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRequestOpts(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -58,21 +59,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{orderId}`;
|
||||
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -86,9 +78,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getInventory without sending the request
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -100,21 +93,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/inventory`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const requestConfig = await this.getInventoryRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
@@ -129,9 +113,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getOrderById without sending the request
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRequestOpts(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -147,21 +132,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{orderId}`;
|
||||
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.getOrderByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
@@ -176,9 +152,9 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for placeOrder without sending the request
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRequestOpts(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -195,21 +171,13 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/order`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: OrderToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.placeOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -58,9 +58,10 @@ export interface UpdateUserRequest {
|
||||
export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for createUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRequestOpts(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -77,22 +78,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -106,9 +98,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithArrayInput without sending the request
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRequestOpts(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -125,21 +117,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithArray`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithArrayInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -152,9 +136,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithListInput without sending the request
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRequestOpts(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -171,21 +155,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithList`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithListInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -198,9 +174,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deleteUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRequestOpts(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -216,21 +193,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -244,9 +212,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getUserByName without sending the request
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRequestOpts(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -262,20 +230,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
const requestConfig = await this.getUserByNameRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue));
|
||||
}
|
||||
@@ -289,9 +249,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for loginUser without sending the request
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRequestOpts(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -321,20 +281,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/login`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
const requestConfig = await this.loginUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
@@ -352,9 +304,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for logoutUser without sending the request
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -362,20 +314,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/logout`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.logoutUserRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -388,9 +332,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updateUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRequestOpts(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -415,22 +360,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updateUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
@@ -68,9 +68,9 @@ export interface UploadFileRequest {
|
||||
export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for addPet without sending the request
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRequestOpts(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -92,21 +92,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.addPetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -119,9 +111,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deletePet without sending the request
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRequestOpts(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -146,20 +138,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deletePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -172,9 +156,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByStatus without sending the request
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRequestOpts(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['status'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'status',
|
||||
@@ -198,21 +183,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByStatus`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByStatusRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
@@ -227,10 +203,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByTags without sending the request
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRequestOpts(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['tags'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'tags',
|
||||
@@ -254,22 +231,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByTags`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByTagsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
@@ -285,9 +252,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getPetById without sending the request
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRequestOpts(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -307,21 +275,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
const requestConfig = await this.getPetByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => PetFromJSON(jsonValue));
|
||||
}
|
||||
@@ -336,9 +295,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePet without sending the request
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRequestOpts(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -360,21 +319,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -387,9 +338,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePetWithForm without sending the request
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRequestOpts(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -432,21 +383,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetWithFormRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -459,9 +402,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for uploadFile without sending the request
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRequestOpts(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -506,21 +449,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}/uploadImage`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
const requestConfig = await this.uploadFileRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ModelApiResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -40,9 +40,10 @@ export interface PlaceOrderRequest {
|
||||
export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for deleteOrder without sending the request
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRequestOpts(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -58,21 +59,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{orderId}`;
|
||||
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -86,9 +78,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getInventory without sending the request
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -100,21 +93,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/inventory`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const requestConfig = await this.getInventoryRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
@@ -129,9 +113,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getOrderById without sending the request
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRequestOpts(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -147,21 +132,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{orderId}`;
|
||||
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.getOrderByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
@@ -176,9 +152,9 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for placeOrder without sending the request
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRequestOpts(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -195,21 +171,13 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/order`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: OrderToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.placeOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -58,9 +58,10 @@ export interface UpdateUserRequest {
|
||||
export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for createUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRequestOpts(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -77,22 +78,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -106,9 +98,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithArrayInput without sending the request
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRequestOpts(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -125,21 +117,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithArray`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithArrayInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -152,9 +136,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithListInput without sending the request
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRequestOpts(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -171,21 +155,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithList`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithListInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -198,9 +174,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deleteUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRequestOpts(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -216,21 +193,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -244,9 +212,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getUserByName without sending the request
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRequestOpts(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -262,20 +230,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
const requestConfig = await this.getUserByNameRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue));
|
||||
}
|
||||
@@ -289,9 +249,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for loginUser without sending the request
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRequestOpts(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -321,20 +281,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/login`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
const requestConfig = await this.loginUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
@@ -352,9 +304,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for logoutUser without sending the request
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -362,20 +314,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/logout`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.logoutUserRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -388,9 +332,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updateUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRequestOpts(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -415,22 +360,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updateUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
@@ -34,9 +34,8 @@ import {
|
||||
export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for test without sending the request
|
||||
*/
|
||||
async testRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TestResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -44,19 +43,12 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/test`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async testRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TestResponse>> {
|
||||
const requestConfig = await this.testRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => TestResponseFromJSON(jsonValue));
|
||||
}
|
||||
@@ -69,9 +61,8 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testArray without sending the request
|
||||
*/
|
||||
async testArrayRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testArrayRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TestArrayResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -79,19 +70,12 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/test-array`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async testArrayRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TestArrayResponse>> {
|
||||
const requestConfig = await this.testArrayRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => TestArrayResponseFromJSON(jsonValue));
|
||||
}
|
||||
@@ -104,9 +88,8 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testDiscriminator without sending the request
|
||||
*/
|
||||
async testDiscriminatorRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testDiscriminatorRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TestDiscriminatorResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -114,19 +97,12 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/test-discriminator`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async testDiscriminatorRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TestDiscriminatorResponse>> {
|
||||
const requestConfig = await this.testDiscriminatorRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => TestDiscriminatorResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -68,9 +68,9 @@ export interface PetApiUploadFileRequest {
|
||||
export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for addPet without sending the request
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRequestOpts(requestParameters: PetApiAddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async addPetRaw(requestParameters: PetApiAddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -92,21 +92,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRaw(requestParameters: PetApiAddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.addPetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -119,9 +111,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deletePet without sending the request
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRequestOpts(requestParameters: PetApiDeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deletePetRaw(requestParameters: PetApiDeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -146,20 +138,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRaw(requestParameters: PetApiDeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deletePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -172,9 +156,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByStatus without sending the request
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRequestOpts(requestParameters: PetApiFindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByStatusRaw(requestParameters: PetApiFindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['status'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'status',
|
||||
@@ -198,21 +183,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByStatus`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRaw(requestParameters: PetApiFindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByStatusRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
@@ -227,10 +203,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByTags without sending the request
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRequestOpts(requestParameters: PetApiFindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByTagsRaw(requestParameters: PetApiFindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['tags'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'tags',
|
||||
@@ -254,22 +231,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByTags`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: PetApiFindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByTagsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
@@ -285,9 +252,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getPetById without sending the request
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRequestOpts(requestParameters: PetApiGetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getPetByIdRaw(requestParameters: PetApiGetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -307,21 +275,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRaw(requestParameters: PetApiGetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
const requestConfig = await this.getPetByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => PetFromJSON(jsonValue));
|
||||
}
|
||||
@@ -336,9 +295,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePet without sending the request
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRequestOpts(requestParameters: PetApiUpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetRaw(requestParameters: PetApiUpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -360,21 +319,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRaw(requestParameters: PetApiUpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -387,9 +338,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePetWithForm without sending the request
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRequestOpts(requestParameters: PetApiUpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetWithFormRaw(requestParameters: PetApiUpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -432,21 +383,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRaw(requestParameters: PetApiUpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetWithFormRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -459,9 +402,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for uploadFile without sending the request
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRequestOpts(requestParameters: PetApiUploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async uploadFileRaw(requestParameters: PetApiUploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -506,21 +449,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}/uploadImage`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRaw(requestParameters: PetApiUploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
const requestConfig = await this.uploadFileRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ModelApiResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -40,9 +40,10 @@ export interface StoreApiPlaceOrderRequest {
|
||||
export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for deleteOrder without sending the request
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRequestOpts(requestParameters: StoreApiDeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteOrderRaw(requestParameters: StoreApiDeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -58,21 +59,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{orderId}`;
|
||||
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRaw(requestParameters: StoreApiDeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -86,9 +78,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getInventory without sending the request
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -100,21 +93,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/inventory`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const requestConfig = await this.getInventoryRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
@@ -129,9 +113,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getOrderById without sending the request
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRequestOpts(requestParameters: StoreApiGetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getOrderByIdRaw(requestParameters: StoreApiGetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -147,21 +132,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{orderId}`;
|
||||
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRaw(requestParameters: StoreApiGetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.getOrderByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
@@ -176,9 +152,9 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for placeOrder without sending the request
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRequestOpts(requestParameters: StoreApiPlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async placeOrderRaw(requestParameters: StoreApiPlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -195,21 +171,13 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/order`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: OrderToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRaw(requestParameters: StoreApiPlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.placeOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -58,9 +58,10 @@ export interface UserApiUpdateUserRequest {
|
||||
export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for createUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRequestOpts(requestParameters: UserApiCreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUserRaw(requestParameters: UserApiCreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -77,22 +78,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRaw(requestParameters: UserApiCreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -106,9 +98,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithArrayInput without sending the request
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRequestOpts(requestParameters: UserApiCreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithArrayInputRaw(requestParameters: UserApiCreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -125,21 +117,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithArray`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRaw(requestParameters: UserApiCreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithArrayInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -152,9 +136,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithListInput without sending the request
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRequestOpts(requestParameters: UserApiCreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithListInputRaw(requestParameters: UserApiCreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -171,21 +155,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithList`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRaw(requestParameters: UserApiCreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithListInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -198,9 +174,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deleteUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRequestOpts(requestParameters: UserApiDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteUserRaw(requestParameters: UserApiDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -216,21 +193,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRaw(requestParameters: UserApiDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -244,9 +212,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getUserByName without sending the request
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRequestOpts(requestParameters: UserApiGetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getUserByNameRaw(requestParameters: UserApiGetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -262,20 +230,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRaw(requestParameters: UserApiGetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
const requestConfig = await this.getUserByNameRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue));
|
||||
}
|
||||
@@ -289,9 +249,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for loginUser without sending the request
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRequestOpts(requestParameters: UserApiLoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async loginUserRaw(requestParameters: UserApiLoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -321,20 +281,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/login`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRaw(requestParameters: UserApiLoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
const requestConfig = await this.loginUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
@@ -352,9 +304,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for logoutUser without sending the request
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -362,20 +314,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/logout`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.logoutUserRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -388,9 +332,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updateUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRequestOpts(requestParameters: UserApiUpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updateUserRaw(requestParameters: UserApiUpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -415,22 +360,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRaw(requestParameters: UserApiUpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updateUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
@@ -39,9 +39,9 @@ export interface GetBehaviorTypeRequest {
|
||||
export class BehaviorApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for getBehaviorPermissions without sending the request
|
||||
* Get permissions for the behavior
|
||||
*/
|
||||
async getBehaviorPermissionsRequestOpts(requestParameters: GetBehaviorPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getBehaviorPermissionsRaw(requestParameters: GetBehaviorPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetBehaviorPermissionsResponse>> {
|
||||
if (requestParameters['behaviorId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'behaviorId',
|
||||
@@ -57,20 +57,12 @@ export class BehaviorApi extends runtime.BaseAPI {
|
||||
let urlPath = `/fake_behavior/{behavior-id}/permissions`;
|
||||
urlPath = urlPath.replace(`{${"behavior-id"}}`, encodeURIComponent(String(requestParameters['behaviorId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get permissions for the behavior
|
||||
*/
|
||||
async getBehaviorPermissionsRaw(requestParameters: GetBehaviorPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetBehaviorPermissionsResponse>> {
|
||||
const requestConfig = await this.getBehaviorPermissionsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GetBehaviorPermissionsResponseFromJSON(jsonValue));
|
||||
}
|
||||
@@ -84,9 +76,9 @@ export class BehaviorApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getBehaviorType without sending the request
|
||||
* Get the type of behavior
|
||||
*/
|
||||
async getBehaviorTypeRequestOpts(requestParameters: GetBehaviorTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getBehaviorTypeRaw(requestParameters: GetBehaviorTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetBehaviorTypeResponse>> {
|
||||
if (requestParameters['behaviorId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'behaviorId',
|
||||
@@ -102,20 +94,12 @@ export class BehaviorApi extends runtime.BaseAPI {
|
||||
let urlPath = `/fake_behavior/{behavior-id}/type`;
|
||||
urlPath = urlPath.replace(`{${"behavior-id"}}`, encodeURIComponent(String(requestParameters['behaviorId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the type of behavior
|
||||
*/
|
||||
async getBehaviorTypeRaw(requestParameters: GetBehaviorTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetBehaviorTypeResponse>> {
|
||||
const requestConfig = await this.getBehaviorTypeRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GetBehaviorTypeResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -97,9 +97,9 @@ export interface UploadFileRequest {
|
||||
export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for addPet without sending the request
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRequestOpts(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['dummyCat'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'dummyCat',
|
||||
@@ -121,21 +121,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: CategoryToJSON(requestParameters['dummyCat']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.addPetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -148,9 +140,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deletePet without sending the request
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRequestOpts(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -175,20 +167,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deletePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -201,10 +185,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByIds without sending the request
|
||||
* Multiple ids can be provided with comma separated strings.
|
||||
* Finds Pets by ids
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByIdsRequestOpts(requestParameters: FindPetsByIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByIdsRaw(requestParameters: FindPetsByIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['ids'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'ids',
|
||||
@@ -228,22 +213,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByIds`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple ids can be provided with comma separated strings.
|
||||
* Finds Pets by ids
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByIdsRaw(requestParameters: FindPetsByIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByIdsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
@@ -259,9 +234,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByStatus without sending the request
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRequestOpts(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FindPetsByStatusResponse>> {
|
||||
if (requestParameters['status'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'status',
|
||||
@@ -285,21 +261,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByStatus`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FindPetsByStatusResponse>> {
|
||||
const requestConfig = await this.findPetsByStatusRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => FindPetsByStatusResponseFromJSON(jsonValue));
|
||||
}
|
||||
@@ -314,10 +281,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByTags without sending the request
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRequestOpts(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['tags'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'tags',
|
||||
@@ -341,22 +309,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByTags`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByTagsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
@@ -372,10 +330,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByUserIds without sending the request
|
||||
* Multiple ids can be provided with comma separated strings.
|
||||
* Finds Pets by user ids
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByUserIdsRequestOpts(requestParameters: FindPetsByUserIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByUserIdsRaw(requestParameters: FindPetsByUserIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FindPetsByUserResponse>> {
|
||||
if (requestParameters['ids'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'ids',
|
||||
@@ -399,22 +358,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByUserIds`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple ids can be provided with comma separated strings.
|
||||
* Finds Pets by user ids
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByUserIdsRaw(requestParameters: FindPetsByUserIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FindPetsByUserResponse>> {
|
||||
const requestConfig = await this.findPetsByUserIdsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => FindPetsByUserResponseFromJSON(jsonValue));
|
||||
}
|
||||
@@ -430,9 +379,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getPetById without sending the request
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRequestOpts(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -452,21 +402,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
const requestConfig = await this.getPetByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => PetFromJSON(jsonValue));
|
||||
}
|
||||
@@ -481,9 +422,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getPetRegions without sending the request
|
||||
* Gets regions for a single pet.
|
||||
*/
|
||||
async getPetRegionsRequestOpts(requestParameters: GetPetRegionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getPetRegionsRaw(requestParameters: GetPetRegionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PetRegionsResponse>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -499,20 +440,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}/regions`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets regions for a single pet.
|
||||
*/
|
||||
async getPetRegionsRaw(requestParameters: GetPetRegionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PetRegionsResponse>> {
|
||||
const requestConfig = await this.getPetRegionsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => PetRegionsResponseFromJSON(jsonValue));
|
||||
}
|
||||
@@ -526,9 +459,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePet without sending the request
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRequestOpts(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -550,21 +483,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -577,9 +502,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePetRegions without sending the request
|
||||
* Updates the pet regions.
|
||||
*/
|
||||
async updatePetRegionsRequestOpts(requestParameters: UpdatePetRegionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetRegionsRaw(requestParameters: UpdatePetRegionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PetRegionsResponse>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -604,21 +529,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}/regions`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['newRegions'],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the pet regions.
|
||||
*/
|
||||
async updatePetRegionsRaw(requestParameters: UpdatePetRegionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PetRegionsResponse>> {
|
||||
const requestConfig = await this.updatePetRegionsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => PetRegionsResponseFromJSON(jsonValue));
|
||||
}
|
||||
@@ -632,9 +549,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePetWithForm without sending the request
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRequestOpts(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -677,21 +594,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetWithFormRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -704,9 +613,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for uploadFile without sending the request
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRequestOpts(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -751,21 +660,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}/uploadImage`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
const requestConfig = await this.uploadFileRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ModelApiResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -44,9 +44,9 @@ export interface GetMatchingPartsRequest {
|
||||
export class PetPartApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for getFakePetPartType without sending the request
|
||||
* Returns single pet part type for the petPart id.
|
||||
*/
|
||||
async getFakePetPartTypeRequestOpts(requestParameters: GetFakePetPartTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getFakePetPartTypeRaw(requestParameters: GetFakePetPartTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPetPartTypeResponse>> {
|
||||
if (requestParameters['fakePetPartId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'fakePetPartId',
|
||||
@@ -62,20 +62,12 @@ export class PetPartApi extends runtime.BaseAPI {
|
||||
let urlPath = `/fake_petParts/{fake_petPart-id}/part-type`;
|
||||
urlPath = urlPath.replace(`{${"fake_petPart-id"}}`, encodeURIComponent(String(requestParameters['fakePetPartId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns single pet part type for the petPart id.
|
||||
*/
|
||||
async getFakePetPartTypeRaw(requestParameters: GetFakePetPartTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPetPartTypeResponse>> {
|
||||
const requestConfig = await this.getFakePetPartTypeRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GetPetPartTypeResponseFromJSON(jsonValue));
|
||||
}
|
||||
@@ -89,9 +81,9 @@ export class PetPartApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getMatchingParts without sending the request
|
||||
* Get the matching parts for the given pet part.
|
||||
*/
|
||||
async getMatchingPartsRequestOpts(requestParameters: GetMatchingPartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getMatchingPartsRaw(requestParameters: GetMatchingPartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMatchingPartsResponse>> {
|
||||
if (requestParameters['fakePetPartId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'fakePetPartId',
|
||||
@@ -148,20 +140,12 @@ export class PetPartApi extends runtime.BaseAPI {
|
||||
let urlPath = `/fake_petParts/{fake_petPart-id}/matching-parts`;
|
||||
urlPath = urlPath.replace(`{${"fake_petPart-id"}}`, encodeURIComponent(String(requestParameters['fakePetPartId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the matching parts for the given pet part.
|
||||
*/
|
||||
async getMatchingPartsRaw(requestParameters: GetMatchingPartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetMatchingPartsResponse>> {
|
||||
const requestConfig = await this.getMatchingPartsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => GetMatchingPartsResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -40,9 +40,10 @@ export interface PlaceOrderRequest {
|
||||
export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for deleteOrder without sending the request
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRequestOpts(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -58,21 +59,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{orderId}`;
|
||||
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -86,9 +78,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getInventory without sending the request
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -100,21 +93,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/inventory`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const requestConfig = await this.getInventoryRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
@@ -129,9 +113,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getOrderById without sending the request
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRequestOpts(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -147,21 +132,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{orderId}`;
|
||||
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.getOrderByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
@@ -176,9 +152,9 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for placeOrder without sending the request
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRequestOpts(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -195,21 +171,13 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/order`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: OrderToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.placeOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -61,9 +61,10 @@ export interface UpdateUserRequest {
|
||||
export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for createUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRequestOpts(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -80,22 +81,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -109,9 +101,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithArrayInput without sending the request
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRequestOpts(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -128,21 +120,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithArray`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithArrayInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -155,9 +139,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithListInput without sending the request
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRequestOpts(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -174,21 +158,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithList`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithListInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -201,9 +177,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deleteUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRequestOpts(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -219,21 +196,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -247,9 +215,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getUserByName without sending the request
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRequestOpts(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -265,20 +233,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
const requestConfig = await this.getUserByNameRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue));
|
||||
}
|
||||
@@ -292,9 +252,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for loginUser without sending the request
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRequestOpts(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -324,20 +284,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/login`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
const requestConfig = await this.loginUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
@@ -355,9 +307,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for logoutUser without sending the request
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -365,20 +317,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/logout`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.logoutUserRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -391,9 +335,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updateUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRequestOpts(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DefaultMetaOnlyResponse>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -418,22 +363,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DefaultMetaOnlyResponse>> {
|
||||
const requestConfig = await this.updateUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => DefaultMetaOnlyResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -32,9 +32,10 @@ export interface 123testSpecialTagsRequest {
|
||||
export class AnotherFakeApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for _123testSpecialTags without sending the request
|
||||
* To test special tags and operation ID starting with number
|
||||
* To test special tags
|
||||
*/
|
||||
async _123testSpecialTagsRequestOpts(requestParameters: 123testSpecialTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async _123testSpecialTagsRaw(requestParameters: 123testSpecialTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Client>> {
|
||||
if (requestParameters['client'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'client',
|
||||
@@ -51,22 +52,13 @@ export class AnotherFakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/another-fake/dummy`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ClientToJSON(requestParameters['client']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags and operation ID starting with number
|
||||
* To test special tags
|
||||
*/
|
||||
async _123testSpecialTagsRaw(requestParameters: 123testSpecialTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Client>> {
|
||||
const requestConfig = await this._123testSpecialTagsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ClientFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -28,9 +28,8 @@ import {
|
||||
export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for fooGet without sending the request
|
||||
*/
|
||||
async fooGetRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fooGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FooGetDefaultResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -38,19 +37,12 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/foo`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async fooGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FooGetDefaultResponse>> {
|
||||
const requestConfig = await this.fooGetRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => FooGetDefaultResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -152,9 +152,9 @@ export interface TestQueryParameterCollectionFormatRequest {
|
||||
export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for fakeBigDecimalMap without sending the request
|
||||
* for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys
|
||||
*/
|
||||
async fakeBigDecimalMapRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeBigDecimalMapRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FakeBigDecimalMap200Response>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -162,20 +162,12 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/BigDecimalMap`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys
|
||||
*/
|
||||
async fakeBigDecimalMapRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FakeBigDecimalMap200Response>> {
|
||||
const requestConfig = await this.fakeBigDecimalMapRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => FakeBigDecimalMap200ResponseFromJSON(jsonValue));
|
||||
}
|
||||
@@ -189,9 +181,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakeHealthGet without sending the request
|
||||
* Health check endpoint
|
||||
*/
|
||||
async fakeHealthGetRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeHealthGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HealthCheckResult>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -199,20 +191,12 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/health`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Health check endpoint
|
||||
*/
|
||||
async fakeHealthGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HealthCheckResult>> {
|
||||
const requestConfig = await this.fakeHealthGetRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => HealthCheckResultFromJSON(jsonValue));
|
||||
}
|
||||
@@ -226,9 +210,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakeHttpSignatureTest without sending the request
|
||||
* test http signature authentication
|
||||
*/
|
||||
async fakeHttpSignatureTestRequestOpts(requestParameters: FakeHttpSignatureTestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeHttpSignatureTestRaw(requestParameters: FakeHttpSignatureTestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['pet'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'pet',
|
||||
@@ -253,21 +237,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/http-signature-test`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['pet']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* test http signature authentication
|
||||
*/
|
||||
async fakeHttpSignatureTestRaw(requestParameters: FakeHttpSignatureTestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.fakeHttpSignatureTestRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -280,9 +256,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakeOuterBooleanSerialize without sending the request
|
||||
* Test serialization of outer boolean types
|
||||
*/
|
||||
async fakeOuterBooleanSerializeRequestOpts(requestParameters: FakeOuterBooleanSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeOuterBooleanSerializeRaw(requestParameters: FakeOuterBooleanSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -292,21 +268,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/outer/boolean`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body'] as any,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Test serialization of outer boolean types
|
||||
*/
|
||||
async fakeOuterBooleanSerializeRaw(requestParameters: FakeOuterBooleanSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>> {
|
||||
const requestConfig = await this.fakeOuterBooleanSerializeRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse<boolean>(response);
|
||||
@@ -324,9 +292,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakeOuterCompositeSerialize without sending the request
|
||||
* Test serialization of object with outer number type
|
||||
*/
|
||||
async fakeOuterCompositeSerializeRequestOpts(requestParameters: FakeOuterCompositeSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeOuterCompositeSerializeRaw(requestParameters: FakeOuterCompositeSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OuterComposite>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -336,21 +304,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/outer/composite`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: OuterCompositeToJSON(requestParameters['outerComposite']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Test serialization of object with outer number type
|
||||
*/
|
||||
async fakeOuterCompositeSerializeRaw(requestParameters: FakeOuterCompositeSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OuterComposite>> {
|
||||
const requestConfig = await this.fakeOuterCompositeSerializeRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OuterCompositeFromJSON(jsonValue));
|
||||
}
|
||||
@@ -364,9 +324,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakeOuterNumberSerialize without sending the request
|
||||
* Test serialization of outer number types
|
||||
*/
|
||||
async fakeOuterNumberSerializeRequestOpts(requestParameters: FakeOuterNumberSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeOuterNumberSerializeRaw(requestParameters: FakeOuterNumberSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<number>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -376,21 +336,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/outer/number`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body'] as any,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Test serialization of outer number types
|
||||
*/
|
||||
async fakeOuterNumberSerializeRaw(requestParameters: FakeOuterNumberSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<number>> {
|
||||
const requestConfig = await this.fakeOuterNumberSerializeRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse<number>(response);
|
||||
@@ -408,9 +360,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakeOuterStringSerialize without sending the request
|
||||
* Test serialization of outer string types
|
||||
*/
|
||||
async fakeOuterStringSerializeRequestOpts(requestParameters: FakeOuterStringSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeOuterStringSerializeRaw(requestParameters: FakeOuterStringSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -420,21 +372,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/outer/string`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body'] as any,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Test serialization of outer string types
|
||||
*/
|
||||
async fakeOuterStringSerializeRaw(requestParameters: FakeOuterStringSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
const requestConfig = await this.fakeOuterStringSerializeRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
@@ -452,9 +396,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakePropertyEnumIntegerSerialize without sending the request
|
||||
* Test serialization of enum (int) properties with examples
|
||||
*/
|
||||
async fakePropertyEnumIntegerSerializeRequestOpts(requestParameters: FakePropertyEnumIntegerSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakePropertyEnumIntegerSerializeRaw(requestParameters: FakePropertyEnumIntegerSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OuterObjectWithEnumProperty>> {
|
||||
if (requestParameters['outerObjectWithEnumProperty'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'outerObjectWithEnumProperty',
|
||||
@@ -471,21 +415,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/property/enum-int`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: OuterObjectWithEnumPropertyToJSON(requestParameters['outerObjectWithEnumProperty']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Test serialization of enum (int) properties with examples
|
||||
*/
|
||||
async fakePropertyEnumIntegerSerializeRaw(requestParameters: FakePropertyEnumIntegerSerializeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OuterObjectWithEnumProperty>> {
|
||||
const requestConfig = await this.fakePropertyEnumIntegerSerializeRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OuterObjectWithEnumPropertyFromJSON(jsonValue));
|
||||
}
|
||||
@@ -499,9 +435,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testBodyWithBinary without sending the request
|
||||
* For this test, the body has to be a binary file.
|
||||
*/
|
||||
async testBodyWithBinaryRequestOpts(requestParameters: TestBodyWithBinaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testBodyWithBinaryRaw(requestParameters: TestBodyWithBinaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -518,21 +454,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/body-with-binary`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body'] as any,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For this test, the body has to be a binary file.
|
||||
*/
|
||||
async testBodyWithBinaryRaw(requestParameters: TestBodyWithBinaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testBodyWithBinaryRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -545,9 +473,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testBodyWithFileSchema without sending the request
|
||||
* For this test, the body for this request must reference a schema named `File`.
|
||||
*/
|
||||
async testBodyWithFileSchemaRequestOpts(requestParameters: TestBodyWithFileSchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testBodyWithFileSchemaRaw(requestParameters: TestBodyWithFileSchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['fileSchemaTestClass'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'fileSchemaTestClass',
|
||||
@@ -564,21 +492,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/body-with-file-schema`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: FileSchemaTestClassToJSON(requestParameters['fileSchemaTestClass']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For this test, the body for this request must reference a schema named `File`.
|
||||
*/
|
||||
async testBodyWithFileSchemaRaw(requestParameters: TestBodyWithFileSchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testBodyWithFileSchemaRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -591,9 +511,8 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testBodyWithQueryParams without sending the request
|
||||
*/
|
||||
async testBodyWithQueryParamsRequestOpts(requestParameters: TestBodyWithQueryParamsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testBodyWithQueryParamsRaw(requestParameters: TestBodyWithQueryParamsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['query'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'query',
|
||||
@@ -621,20 +540,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/body-with-query-params`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['user']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async testBodyWithQueryParamsRaw(requestParameters: TestBodyWithQueryParamsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testBodyWithQueryParamsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -646,9 +558,10 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testClientModel without sending the request
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
*/
|
||||
async testClientModelRequestOpts(requestParameters: TestClientModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testClientModelRaw(requestParameters: TestClientModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Client>> {
|
||||
if (requestParameters['client'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'client',
|
||||
@@ -665,22 +578,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ClientToJSON(requestParameters['client']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
*/
|
||||
async testClientModelRaw(requestParameters: TestClientModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Client>> {
|
||||
const requestConfig = await this.testClientModelRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ClientFromJSON(jsonValue));
|
||||
}
|
||||
@@ -695,9 +599,10 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testEndpointParameters without sending the request
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*/
|
||||
async testEndpointParametersRequestOpts(requestParameters: TestEndpointParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testEndpointParametersRaw(requestParameters: TestEndpointParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['number'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'number',
|
||||
@@ -808,22 +713,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*/
|
||||
async testEndpointParametersRaw(requestParameters: TestEndpointParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testEndpointParametersRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -837,9 +733,10 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testEnumParameters without sending the request
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
*/
|
||||
async testEnumParametersRequestOpts(requestParameters: TestEnumParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testEnumParametersRaw(requestParameters: TestEnumParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['enumQueryStringArray'] != null) {
|
||||
@@ -897,22 +794,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
*/
|
||||
async testEnumParametersRaw(requestParameters: TestEnumParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testEnumParametersRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -926,9 +814,10 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testGroupParameters without sending the request
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
*/
|
||||
async testGroupParametersRequestOpts(requestParameters: TestGroupParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testGroupParametersRaw(requestParameters: TestGroupParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['requiredStringGroup'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'requiredStringGroup',
|
||||
@@ -989,21 +878,12 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
*/
|
||||
async testGroupParametersRaw(requestParameters: TestGroupParametersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testGroupParametersRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -1017,9 +897,10 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testInlineAdditionalProperties without sending the request
|
||||
*
|
||||
* test inline additionalProperties
|
||||
*/
|
||||
async testInlineAdditionalPropertiesRequestOpts(requestParameters: TestInlineAdditionalPropertiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testInlineAdditionalPropertiesRaw(requestParameters: TestInlineAdditionalPropertiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['requestBody'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'requestBody',
|
||||
@@ -1036,22 +917,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/inline-additionalProperties`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['requestBody'],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* test inline additionalProperties
|
||||
*/
|
||||
async testInlineAdditionalPropertiesRaw(requestParameters: TestInlineAdditionalPropertiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testInlineAdditionalPropertiesRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -1065,9 +937,10 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testJsonFormData without sending the request
|
||||
*
|
||||
* test json serialization of form data
|
||||
*/
|
||||
async testJsonFormDataRequestOpts(requestParameters: TestJsonFormDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testJsonFormDataRaw(requestParameters: TestJsonFormDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['param'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'param',
|
||||
@@ -1111,22 +984,13 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/jsonFormData`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* test json serialization of form data
|
||||
*/
|
||||
async testJsonFormDataRaw(requestParameters: TestJsonFormDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testJsonFormDataRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -1140,9 +1004,9 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for testQueryParameterCollectionFormat without sending the request
|
||||
* To test the collection format in query parameters
|
||||
*/
|
||||
async testQueryParameterCollectionFormatRequestOpts(requestParameters: TestQueryParameterCollectionFormatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testQueryParameterCollectionFormatRaw(requestParameters: TestQueryParameterCollectionFormatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['pipe'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'pipe',
|
||||
@@ -1222,20 +1086,12 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/test-query-parameters`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* To test the collection format in query parameters
|
||||
*/
|
||||
async testQueryParameterCollectionFormatRaw(requestParameters: TestQueryParameterCollectionFormatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.testQueryParameterCollectionFormatRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
@@ -32,9 +32,10 @@ export interface TestClassnameRequest {
|
||||
export class FakeClassnameTags123Api extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for testClassname without sending the request
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
*/
|
||||
async testClassnameRequestOpts(requestParameters: TestClassnameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async testClassnameRaw(requestParameters: TestClassnameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Client>> {
|
||||
if (requestParameters['client'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'client',
|
||||
@@ -55,22 +56,13 @@ export class FakeClassnameTags123Api extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake_classname_test`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ClientToJSON(requestParameters['client']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
*/
|
||||
async testClassnameRaw(requestParameters: TestClassnameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Client>> {
|
||||
const requestConfig = await this.testClassnameRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ClientFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -74,9 +74,10 @@ export interface UploadFileWithRequiredFileRequest {
|
||||
export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for addPet without sending the request
|
||||
*
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRequestOpts(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['pet'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'pet',
|
||||
@@ -98,22 +99,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['pet']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.addPetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -127,9 +119,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deletePet without sending the request
|
||||
*
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRequestOpts(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -154,21 +147,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deletePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -182,9 +166,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByStatus without sending the request
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRequestOpts(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['status'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'status',
|
||||
@@ -208,21 +193,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByStatus`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByStatusRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
@@ -237,10 +213,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByTags without sending the request
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRequestOpts(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Set<Pet>>> {
|
||||
if (requestParameters['tags'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'tags',
|
||||
@@ -264,22 +241,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByTags`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Set<Pet>>> {
|
||||
const requestConfig = await this.findPetsByTagsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => new Set(jsonValue.map(PetFromJSON)));
|
||||
}
|
||||
@@ -295,9 +262,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getPetById without sending the request
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRequestOpts(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -317,21 +285,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
const requestConfig = await this.getPetByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => PetFromJSON(jsonValue));
|
||||
}
|
||||
@@ -346,9 +305,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePet without sending the request
|
||||
*
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRequestOpts(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['pet'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'pet',
|
||||
@@ -370,22 +330,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['pet']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -399,9 +350,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePetWithForm without sending the request
|
||||
*
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRequestOpts(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -444,22 +396,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetWithFormRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -473,9 +416,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for uploadFile without sending the request
|
||||
*
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRequestOpts(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -520,22 +464,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}/uploadImage`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
const requestConfig = await this.uploadFileRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ModelApiResponseFromJSON(jsonValue));
|
||||
}
|
||||
@@ -550,9 +485,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for uploadFileWithRequiredFile without sending the request
|
||||
*
|
||||
* uploads an image (required)
|
||||
*/
|
||||
async uploadFileWithRequiredFileRequestOpts(requestParameters: UploadFileWithRequiredFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async uploadFileWithRequiredFileRaw(requestParameters: UploadFileWithRequiredFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -604,22 +540,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/fake/{petId}/uploadImageWithRequiredFile`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* uploads an image (required)
|
||||
*/
|
||||
async uploadFileWithRequiredFileRaw(requestParameters: UploadFileWithRequiredFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
const requestConfig = await this.uploadFileWithRequiredFileRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ModelApiResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -40,9 +40,10 @@ export interface PlaceOrderRequest {
|
||||
export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for deleteOrder without sending the request
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRequestOpts(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -58,21 +59,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{order_id}`;
|
||||
urlPath = urlPath.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -86,9 +78,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getInventory without sending the request
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -100,21 +93,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/inventory`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const requestConfig = await this.getInventoryRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
@@ -129,9 +113,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getOrderById without sending the request
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRequestOpts(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -147,21 +132,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{order_id}`;
|
||||
urlPath = urlPath.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.getOrderByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
@@ -176,9 +152,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for placeOrder without sending the request
|
||||
*
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRequestOpts(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['order'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'order',
|
||||
@@ -195,22 +172,13 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/order`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: OrderToJSON(requestParameters['order']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.placeOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -58,9 +58,10 @@ export interface UpdateUserRequest {
|
||||
export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for createUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRequestOpts(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['user'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'user',
|
||||
@@ -77,22 +78,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['user']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -106,9 +98,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithArrayInput without sending the request
|
||||
*
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRequestOpts(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['user'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'user',
|
||||
@@ -125,22 +118,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithArray`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['user']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithArrayInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -154,9 +138,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithListInput without sending the request
|
||||
*
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRequestOpts(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['user'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'user',
|
||||
@@ -173,22 +158,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithList`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['user']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithListInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -202,9 +178,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deleteUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRequestOpts(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -220,21 +197,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -248,9 +216,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getUserByName without sending the request
|
||||
*
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRequestOpts(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -266,21 +235,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
const requestConfig = await this.getUserByNameRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue));
|
||||
}
|
||||
@@ -295,9 +255,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for loginUser without sending the request
|
||||
*
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRequestOpts(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -327,21 +288,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/login`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
const requestConfig = await this.loginUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
@@ -360,9 +312,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for logoutUser without sending the request
|
||||
*
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -370,21 +323,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/logout`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.logoutUserRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -398,9 +342,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updateUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRequestOpts(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -425,22 +370,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['user']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updateUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
@@ -68,9 +68,10 @@ export interface UploadFileRequest {
|
||||
export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for addPet without sending the request
|
||||
*
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRequestOpts(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
if (requestParameters['pet'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'pet',
|
||||
@@ -92,22 +93,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['pet']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
const requestConfig = await this.addPetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => PetFromJSON(jsonValue));
|
||||
}
|
||||
@@ -122,9 +114,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deletePet without sending the request
|
||||
*
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRequestOpts(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -149,21 +142,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deletePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -177,9 +161,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByStatus without sending the request
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRequestOpts(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['status'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'status',
|
||||
@@ -203,21 +188,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByStatus`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByStatusRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
@@ -232,10 +208,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByTags without sending the request
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRequestOpts(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['tags'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'tags',
|
||||
@@ -259,22 +236,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByTags`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByTagsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
@@ -290,9 +257,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getPetById without sending the request
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRequestOpts(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -312,21 +280,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
const requestConfig = await this.getPetByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => PetFromJSON(jsonValue));
|
||||
}
|
||||
@@ -341,9 +300,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePet without sending the request
|
||||
*
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRequestOpts(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
if (requestParameters['pet'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'pet',
|
||||
@@ -365,22 +325,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['pet']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
const requestConfig = await this.updatePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => PetFromJSON(jsonValue));
|
||||
}
|
||||
@@ -395,9 +346,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePetWithForm without sending the request
|
||||
*
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRequestOpts(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -440,22 +392,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetWithFormRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -469,9 +412,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for uploadFile without sending the request
|
||||
*
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRequestOpts(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -516,22 +460,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}/uploadImage`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
const requestConfig = await this.uploadFileRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ModelApiResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -40,9 +40,10 @@ export interface PlaceOrderRequest {
|
||||
export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for deleteOrder without sending the request
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRequestOpts(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -58,21 +59,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{orderId}`;
|
||||
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -86,9 +78,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getInventory without sending the request
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -100,21 +93,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/inventory`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const requestConfig = await this.getInventoryRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
@@ -129,9 +113,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getOrderById without sending the request
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRequestOpts(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -147,21 +132,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{orderId}`;
|
||||
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.getOrderByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
@@ -176,9 +152,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for placeOrder without sending the request
|
||||
*
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRequestOpts(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['order'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'order',
|
||||
@@ -195,22 +172,13 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/order`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: OrderToJSON(requestParameters['order']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.placeOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -58,9 +58,10 @@ export interface UpdateUserRequest {
|
||||
export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for createUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRequestOpts(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['user'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'user',
|
||||
@@ -81,22 +82,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['user']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -110,9 +102,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithArrayInput without sending the request
|
||||
*
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRequestOpts(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['user'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'user',
|
||||
@@ -133,22 +126,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithArray`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['user']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithArrayInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -162,9 +146,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithListInput without sending the request
|
||||
*
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRequestOpts(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['user'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'user',
|
||||
@@ -185,22 +170,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithList`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['user']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithListInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -214,9 +190,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deleteUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRequestOpts(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -236,21 +213,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -264,9 +232,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getUserByName without sending the request
|
||||
*
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRequestOpts(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -282,21 +251,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
const requestConfig = await this.getUserByNameRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue));
|
||||
}
|
||||
@@ -311,9 +271,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for loginUser without sending the request
|
||||
*
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRequestOpts(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -343,21 +304,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/login`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
const requestConfig = await this.loginUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
@@ -376,9 +328,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for logoutUser without sending the request
|
||||
*
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -390,21 +343,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/logout`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.logoutUserRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -418,9 +362,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updateUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRequestOpts(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -449,22 +394,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['user']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updateUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
@@ -69,15 +69,6 @@ export interface UploadFileRequest {
|
||||
* @interface PetApiInterface
|
||||
*/
|
||||
export interface PetApiInterface {
|
||||
/**
|
||||
* Creates request options for addPet without sending the request
|
||||
* @param {Pet} body Pet object that needs to be added to the store
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApiInterface
|
||||
*/
|
||||
addPetRequestOpts(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Add a new pet to the store
|
||||
@@ -93,16 +84,6 @@ export interface PetApiInterface {
|
||||
*/
|
||||
addPet(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
||||
|
||||
/**
|
||||
* Creates request options for deletePet without sending the request
|
||||
* @param {number} petId Pet id to delete
|
||||
* @param {string} [apiKey]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApiInterface
|
||||
*/
|
||||
deletePetRequestOpts(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Deletes a pet
|
||||
@@ -119,15 +100,6 @@ export interface PetApiInterface {
|
||||
*/
|
||||
deletePet(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByStatus without sending the request
|
||||
* @param {Array<'available' | 'pending' | 'sold'>} status Status values that need to be considered for filter
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApiInterface
|
||||
*/
|
||||
findPetsByStatusRequestOpts(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* @summary Finds Pets by status
|
||||
@@ -144,16 +116,6 @@ export interface PetApiInterface {
|
||||
*/
|
||||
findPetsByStatus(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Pet>>;
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByTags without sending the request
|
||||
* @param {Array<string>} tags Tags to filter by
|
||||
* @param {*} [options] Override http request option.
|
||||
* @deprecated
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApiInterface
|
||||
*/
|
||||
findPetsByTagsRequestOpts(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @summary Finds Pets by tags
|
||||
@@ -172,15 +134,6 @@ export interface PetApiInterface {
|
||||
*/
|
||||
findPetsByTags(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Pet>>;
|
||||
|
||||
/**
|
||||
* Creates request options for getPetById without sending the request
|
||||
* @param {number} petId ID of pet to return
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApiInterface
|
||||
*/
|
||||
getPetByIdRequestOpts(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
* Returns a single pet
|
||||
* @summary Find pet by ID
|
||||
@@ -197,15 +150,6 @@ export interface PetApiInterface {
|
||||
*/
|
||||
getPetById(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Pet>;
|
||||
|
||||
/**
|
||||
* Creates request options for updatePet without sending the request
|
||||
* @param {Pet} body Pet object that needs to be added to the store
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApiInterface
|
||||
*/
|
||||
updatePetRequestOpts(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Update an existing pet
|
||||
@@ -221,17 +165,6 @@ export interface PetApiInterface {
|
||||
*/
|
||||
updatePet(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
||||
|
||||
/**
|
||||
* Creates request options for updatePetWithForm without sending the request
|
||||
* @param {number} petId ID of pet that needs to be updated
|
||||
* @param {string} [name] Updated name of the pet
|
||||
* @param {string} [status] Updated status of the pet
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApiInterface
|
||||
*/
|
||||
updatePetWithFormRequestOpts(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Updates a pet in the store with form data
|
||||
@@ -249,17 +182,6 @@ export interface PetApiInterface {
|
||||
*/
|
||||
updatePetWithForm(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
||||
|
||||
/**
|
||||
* Creates request options for uploadFile without sending the request
|
||||
* @param {number} petId ID of pet to update
|
||||
* @param {string} [additionalMetadata] Additional data to pass to server
|
||||
* @param {Blob} [file] file to upload
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof PetApiInterface
|
||||
*/
|
||||
uploadFileRequestOpts(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary uploads an image
|
||||
@@ -285,9 +207,9 @@ export interface PetApiInterface {
|
||||
export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
|
||||
/**
|
||||
* Creates request options for addPet without sending the request
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRequestOpts(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -309,21 +231,13 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.addPetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -336,9 +250,9 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deletePet without sending the request
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRequestOpts(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -363,20 +277,12 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deletePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -389,9 +295,10 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByStatus without sending the request
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRequestOpts(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['status'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'status',
|
||||
@@ -415,21 +322,12 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
|
||||
let urlPath = `/pet/findByStatus`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByStatusRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
@@ -444,10 +342,11 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByTags without sending the request
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRequestOpts(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['tags'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'tags',
|
||||
@@ -471,22 +370,12 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
|
||||
let urlPath = `/pet/findByTags`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByTagsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
@@ -502,9 +391,10 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getPetById without sending the request
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRequestOpts(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -524,21 +414,12 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
const requestConfig = await this.getPetByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => PetFromJSON(jsonValue));
|
||||
}
|
||||
@@ -553,9 +434,9 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePet without sending the request
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRequestOpts(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -577,21 +458,13 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -604,9 +477,9 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePetWithForm without sending the request
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRequestOpts(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -649,21 +522,13 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetWithFormRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -676,9 +541,9 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for uploadFile without sending the request
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRequestOpts(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -723,21 +588,13 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
let urlPath = `/pet/{petId}/uploadImage`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
const requestConfig = await this.uploadFileRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ModelApiResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -41,15 +41,6 @@ export interface PlaceOrderRequest {
|
||||
* @interface StoreApiInterface
|
||||
*/
|
||||
export interface StoreApiInterface {
|
||||
/**
|
||||
* Creates request options for deleteOrder without sending the request
|
||||
* @param {string} orderId ID of the order that needs to be deleted
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApiInterface
|
||||
*/
|
||||
deleteOrderRequestOpts(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @summary Delete purchase order by ID
|
||||
@@ -66,14 +57,6 @@ export interface StoreApiInterface {
|
||||
*/
|
||||
deleteOrder(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
||||
|
||||
/**
|
||||
* Creates request options for getInventory without sending the request
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApiInterface
|
||||
*/
|
||||
getInventoryRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
* @summary Returns pet inventories by status
|
||||
@@ -89,15 +72,6 @@ export interface StoreApiInterface {
|
||||
*/
|
||||
getInventory(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: number; }>;
|
||||
|
||||
/**
|
||||
* Creates request options for getOrderById without sending the request
|
||||
* @param {number} orderId ID of pet that needs to be fetched
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApiInterface
|
||||
*/
|
||||
getOrderByIdRequestOpts(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* @summary Find purchase order by ID
|
||||
@@ -114,15 +88,6 @@ export interface StoreApiInterface {
|
||||
*/
|
||||
getOrderById(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Order>;
|
||||
|
||||
/**
|
||||
* Creates request options for placeOrder without sending the request
|
||||
* @param {Order} body order placed for purchasing the pet
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof StoreApiInterface
|
||||
*/
|
||||
placeOrderRequestOpts(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Place an order for a pet
|
||||
@@ -146,9 +111,10 @@ export interface StoreApiInterface {
|
||||
export class StoreApi extends runtime.BaseAPI implements StoreApiInterface {
|
||||
|
||||
/**
|
||||
* Creates request options for deleteOrder without sending the request
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRequestOpts(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -164,21 +130,12 @@ export class StoreApi extends runtime.BaseAPI implements StoreApiInterface {
|
||||
let urlPath = `/store/order/{orderId}`;
|
||||
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -192,9 +149,10 @@ export class StoreApi extends runtime.BaseAPI implements StoreApiInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getInventory without sending the request
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -206,21 +164,12 @@ export class StoreApi extends runtime.BaseAPI implements StoreApiInterface {
|
||||
|
||||
let urlPath = `/store/inventory`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const requestConfig = await this.getInventoryRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
@@ -235,9 +184,10 @@ export class StoreApi extends runtime.BaseAPI implements StoreApiInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getOrderById without sending the request
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRequestOpts(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -253,21 +203,12 @@ export class StoreApi extends runtime.BaseAPI implements StoreApiInterface {
|
||||
let urlPath = `/store/order/{orderId}`;
|
||||
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.getOrderByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
@@ -282,9 +223,9 @@ export class StoreApi extends runtime.BaseAPI implements StoreApiInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for placeOrder without sending the request
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRequestOpts(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -301,21 +242,13 @@ export class StoreApi extends runtime.BaseAPI implements StoreApiInterface {
|
||||
|
||||
let urlPath = `/store/order`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: OrderToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.placeOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -59,15 +59,6 @@ export interface UpdateUserRequest {
|
||||
* @interface UserApiInterface
|
||||
*/
|
||||
export interface UserApiInterface {
|
||||
/**
|
||||
* Creates request options for createUser without sending the request
|
||||
* @param {User} body Created user object
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApiInterface
|
||||
*/
|
||||
createUserRequestOpts(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* @summary Create user
|
||||
@@ -84,15 +75,6 @@ export interface UserApiInterface {
|
||||
*/
|
||||
createUser(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithArrayInput without sending the request
|
||||
* @param {Array<User>} body List of user object
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApiInterface
|
||||
*/
|
||||
createUsersWithArrayInputRequestOpts(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Creates list of users with given input array
|
||||
@@ -108,15 +90,6 @@ export interface UserApiInterface {
|
||||
*/
|
||||
createUsersWithArrayInput(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithListInput without sending the request
|
||||
* @param {Array<User>} body List of user object
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApiInterface
|
||||
*/
|
||||
createUsersWithListInputRequestOpts(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Creates list of users with given input array
|
||||
@@ -132,15 +105,6 @@ export interface UserApiInterface {
|
||||
*/
|
||||
createUsersWithListInput(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
||||
|
||||
/**
|
||||
* Creates request options for deleteUser without sending the request
|
||||
* @param {string} username The name that needs to be deleted
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApiInterface
|
||||
*/
|
||||
deleteUserRequestOpts(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* @summary Delete user
|
||||
@@ -157,15 +121,6 @@ export interface UserApiInterface {
|
||||
*/
|
||||
deleteUser(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
||||
|
||||
/**
|
||||
* Creates request options for getUserByName without sending the request
|
||||
* @param {string} username The name that needs to be fetched. Use user1 for testing.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApiInterface
|
||||
*/
|
||||
getUserByNameRequestOpts(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get user by user name
|
||||
@@ -181,16 +136,6 @@ export interface UserApiInterface {
|
||||
*/
|
||||
getUserByName(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<User>;
|
||||
|
||||
/**
|
||||
* Creates request options for loginUser without sending the request
|
||||
* @param {string} username The user name for login
|
||||
* @param {string} password The password for login in clear text
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApiInterface
|
||||
*/
|
||||
loginUserRequestOpts(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Logs user into the system
|
||||
@@ -207,14 +152,6 @@ export interface UserApiInterface {
|
||||
*/
|
||||
loginUser(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
||||
|
||||
/**
|
||||
* Creates request options for logoutUser without sending the request
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApiInterface
|
||||
*/
|
||||
logoutUserRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Logs out current logged in user session
|
||||
@@ -229,16 +166,6 @@ export interface UserApiInterface {
|
||||
*/
|
||||
logoutUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
||||
|
||||
/**
|
||||
* Creates request options for updateUser without sending the request
|
||||
* @param {string} username name that need to be deleted
|
||||
* @param {User} body Updated user object
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof UserApiInterface
|
||||
*/
|
||||
updateUserRequestOpts(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts>;
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* @summary Updated user
|
||||
@@ -264,9 +191,10 @@ export interface UserApiInterface {
|
||||
export class UserApi extends runtime.BaseAPI implements UserApiInterface {
|
||||
|
||||
/**
|
||||
* Creates request options for createUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRequestOpts(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -283,22 +211,13 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface {
|
||||
|
||||
let urlPath = `/user`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -312,9 +231,9 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithArrayInput without sending the request
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRequestOpts(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -331,21 +250,13 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface {
|
||||
|
||||
let urlPath = `/user/createWithArray`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithArrayInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -358,9 +269,9 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithListInput without sending the request
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRequestOpts(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -377,21 +288,13 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface {
|
||||
|
||||
let urlPath = `/user/createWithList`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithListInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -404,9 +307,10 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deleteUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRequestOpts(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -422,21 +326,12 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -450,9 +345,9 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getUserByName without sending the request
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRequestOpts(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -468,20 +363,12 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
const requestConfig = await this.getUserByNameRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue));
|
||||
}
|
||||
@@ -495,9 +382,9 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for loginUser without sending the request
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRequestOpts(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -527,20 +414,12 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface {
|
||||
|
||||
let urlPath = `/user/login`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
const requestConfig = await this.loginUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
@@ -558,9 +437,9 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for logoutUser without sending the request
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -568,20 +447,12 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface {
|
||||
|
||||
let urlPath = `/user/logout`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.logoutUserRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -594,9 +465,10 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updateUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRequestOpts(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -621,22 +493,13 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updateUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
@@ -68,9 +68,9 @@ export interface UploadFileRequest {
|
||||
export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for addPet without sending the request
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRequestOpts(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -92,21 +92,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.addPetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -119,9 +111,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deletePet without sending the request
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRequestOpts(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -146,20 +138,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deletePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -172,9 +156,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByStatus without sending the request
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRequestOpts(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['status'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'status',
|
||||
@@ -198,21 +183,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByStatus`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByStatusRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
@@ -227,10 +203,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByTags without sending the request
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRequestOpts(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['tags'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'tags',
|
||||
@@ -254,22 +231,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByTags`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByTagsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
@@ -285,9 +252,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getPetById without sending the request
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRequestOpts(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -307,21 +275,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
const requestConfig = await this.getPetByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => PetFromJSON(jsonValue));
|
||||
}
|
||||
@@ -336,9 +295,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePet without sending the request
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRequestOpts(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -360,21 +319,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -387,9 +338,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePetWithForm without sending the request
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRequestOpts(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -432,21 +383,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetWithFormRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -459,9 +402,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for uploadFile without sending the request
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRequestOpts(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -506,21 +449,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}/uploadImage`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
const requestConfig = await this.uploadFileRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ModelApiResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -40,9 +40,10 @@ export interface PlaceOrderRequest {
|
||||
export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for deleteOrder without sending the request
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRequestOpts(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -58,21 +59,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{orderId}`;
|
||||
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -86,9 +78,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getInventory without sending the request
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -100,21 +93,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/inventory`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const requestConfig = await this.getInventoryRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
@@ -129,9 +113,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getOrderById without sending the request
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRequestOpts(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -147,21 +132,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{orderId}`;
|
||||
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.getOrderByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
@@ -176,9 +152,9 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for placeOrder without sending the request
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRequestOpts(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -195,21 +171,13 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/order`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: OrderToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.placeOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -58,9 +58,10 @@ export interface UpdateUserRequest {
|
||||
export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for createUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRequestOpts(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -77,22 +78,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -106,9 +98,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithArrayInput without sending the request
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRequestOpts(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -125,21 +117,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithArray`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithArrayInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -152,9 +136,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithListInput without sending the request
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRequestOpts(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -171,21 +155,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithList`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body']!.map(UserToJSON),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithListInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -198,9 +174,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deleteUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRequestOpts(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -216,21 +193,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -244,9 +212,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getUserByName without sending the request
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRequestOpts(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -262,20 +230,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
const requestConfig = await this.getUserByNameRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue));
|
||||
}
|
||||
@@ -289,9 +249,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for loginUser without sending the request
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRequestOpts(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -321,20 +281,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/login`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
const requestConfig = await this.loginUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
@@ -352,9 +304,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for logoutUser without sending the request
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -362,20 +314,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/logout`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.logoutUserRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -388,9 +332,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updateUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRequestOpts(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -415,22 +360,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters['body']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updateUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
@@ -59,9 +59,8 @@ export interface FakeEnumRequestPostRefRequest {
|
||||
export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for fakeEnumRequestGetInline without sending the request
|
||||
*/
|
||||
async fakeEnumRequestGetInlineRequestOpts(requestParameters: FakeEnumRequestGetInlineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeEnumRequestGetInlineRaw(requestParameters: FakeEnumRequestGetInlineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FakeEnumRequestGetInline200Response>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['stringEnum'] != null) {
|
||||
@@ -85,19 +84,12 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/enum-request-inline`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async fakeEnumRequestGetInlineRaw(requestParameters: FakeEnumRequestGetInlineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FakeEnumRequestGetInline200Response>> {
|
||||
const requestConfig = await this.fakeEnumRequestGetInlineRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => FakeEnumRequestGetInline200ResponseFromJSON(jsonValue));
|
||||
}
|
||||
@@ -110,9 +102,8 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakeEnumRequestGetRef without sending the request
|
||||
*/
|
||||
async fakeEnumRequestGetRefRequestOpts(requestParameters: FakeEnumRequestGetRefRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeEnumRequestGetRefRaw(requestParameters: FakeEnumRequestGetRefRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EnumPatternObject>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['stringEnum'] != null) {
|
||||
@@ -136,19 +127,12 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/enum-request-ref`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async fakeEnumRequestGetRefRaw(requestParameters: FakeEnumRequestGetRefRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EnumPatternObject>> {
|
||||
const requestConfig = await this.fakeEnumRequestGetRefRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => EnumPatternObjectFromJSON(jsonValue));
|
||||
}
|
||||
@@ -161,9 +145,8 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakeEnumRequestPostInline without sending the request
|
||||
*/
|
||||
async fakeEnumRequestPostInlineRequestOpts(requestParameters: FakeEnumRequestPostInlineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeEnumRequestPostInlineRaw(requestParameters: FakeEnumRequestPostInlineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FakeEnumRequestGetInline200Response>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -173,20 +156,13 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/enum-request-inline`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: FakeEnumRequestGetInline200ResponseToJSON(requestParameters['fakeEnumRequestGetInline200Response']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async fakeEnumRequestPostInlineRaw(requestParameters: FakeEnumRequestPostInlineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FakeEnumRequestGetInline200Response>> {
|
||||
const requestConfig = await this.fakeEnumRequestPostInlineRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => FakeEnumRequestGetInline200ResponseFromJSON(jsonValue));
|
||||
}
|
||||
@@ -199,9 +175,8 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for fakeEnumRequestPostRef without sending the request
|
||||
*/
|
||||
async fakeEnumRequestPostRefRequestOpts(requestParameters: FakeEnumRequestPostRefRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async fakeEnumRequestPostRefRaw(requestParameters: FakeEnumRequestPostRefRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EnumPatternObject>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -211,20 +186,13 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/fake/enum-request-ref`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: EnumPatternObjectToJSON(requestParameters['enumPatternObject']),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async fakeEnumRequestPostRefRaw(requestParameters: FakeEnumRequestPostRefRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EnumPatternObject>> {
|
||||
const requestConfig = await this.fakeEnumRequestPostRefRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => EnumPatternObjectFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
@@ -62,9 +62,9 @@ export interface UploadFileRequest {
|
||||
export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for addPet without sending the request
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRequestOpts(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -86,21 +86,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body'],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.addPetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -113,9 +105,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deletePet without sending the request
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRequestOpts(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -140,20 +132,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deletePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -166,9 +150,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByStatus without sending the request
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRequestOpts(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['status'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'status',
|
||||
@@ -192,21 +177,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByStatus`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByStatusRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response);
|
||||
}
|
||||
@@ -221,10 +197,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for findPetsByTags without sending the request
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRequestOpts(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters['tags'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'tags',
|
||||
@@ -248,22 +225,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet/findByTags`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
const requestConfig = await this.findPetsByTagsRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response);
|
||||
}
|
||||
@@ -279,9 +246,10 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getPetById without sending the request
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRequestOpts(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -301,21 +269,12 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>> {
|
||||
const requestConfig = await this.getPetByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response);
|
||||
}
|
||||
@@ -330,9 +289,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePet without sending the request
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRequestOpts(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -354,21 +313,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/pet`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body'],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -381,9 +332,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updatePetWithForm without sending the request
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRequestOpts(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -426,21 +377,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updatePetWithFormRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -453,9 +396,9 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for uploadFile without sending the request
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRequestOpts(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
if (requestParameters['petId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'petId',
|
||||
@@ -500,21 +443,13 @@ export class PetApi extends runtime.BaseAPI {
|
||||
let urlPath = `/pet/{petId}/uploadImage`;
|
||||
urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
const requestConfig = await this.uploadFileRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response);
|
||||
}
|
||||
|
||||
@@ -36,9 +36,10 @@ export interface PlaceOrderRequest {
|
||||
export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for deleteOrder without sending the request
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRequestOpts(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -54,21 +55,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{orderId}`;
|
||||
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -82,9 +74,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getInventory without sending the request
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -96,21 +89,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/inventory`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const requestConfig = await this.getInventoryRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
@@ -125,9 +109,10 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getOrderById without sending the request
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRequestOpts(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['orderId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'orderId',
|
||||
@@ -143,21 +128,12 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
let urlPath = `/store/order/{orderId}`;
|
||||
urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.getOrderByIdRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response);
|
||||
}
|
||||
@@ -172,9 +148,9 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for placeOrder without sending the request
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRequestOpts(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -191,21 +167,13 @@ export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/store/order`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body'],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Order>> {
|
||||
const requestConfig = await this.placeOrderRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response);
|
||||
}
|
||||
|
||||
@@ -54,9 +54,10 @@ export interface UpdateUserRequest {
|
||||
export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates request options for createUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRequestOpts(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -73,22 +74,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body'],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -102,9 +94,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithArrayInput without sending the request
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRequestOpts(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -121,21 +113,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithArray`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body'],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithArrayInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -148,9 +132,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for createUsersWithListInput without sending the request
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRequestOpts(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
@@ -167,21 +151,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/createWithList`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body'],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.createUsersWithListInputRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -194,9 +170,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for deleteUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRequestOpts(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -212,21 +189,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.deleteUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -240,9 +208,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for getUserByName without sending the request
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRequestOpts(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -258,20 +226,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> {
|
||||
const requestConfig = await this.getUserByNameRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response);
|
||||
}
|
||||
@@ -285,9 +245,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for loginUser without sending the request
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRequestOpts(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -317,20 +277,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/login`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
const requestConfig = await this.loginUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
@@ -348,9 +300,9 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for logoutUser without sending the request
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRequestOpts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@@ -358,20 +310,12 @@ export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
let urlPath = `/user/logout`;
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.logoutUserRequestConfig(initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
@@ -384,9 +328,10 @@ export class UserApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates request options for updateUser without sending the request
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRequestOpts(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.RequestOpts> {
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters['username'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'username',
|
||||
@@ -411,22 +356,13 @@ export class UserApi extends runtime.BaseAPI {
|
||||
let urlPath = `/user/{username}`;
|
||||
urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
|
||||
|
||||
return {
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body'],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const requestConfig = await this.updateUserRequestConfig(requestParameters, initOverrides);
|
||||
const response = await this.request(requestConfig, initOverrides);
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user