@@ -17,7 +17,7 @@ import {
1717 PetStoreDto ,
1818} from "./model" ;
1919
20- import { BaseAPI , SecurityScheme } from "./base" ;
20+ import { BaseAPI , RequestCallOptions , SecurityScheme } from "./base" ;
2121
2222export interface ApplicationApis {
2323 defaultApi : DefaultApiInterface ;
@@ -35,7 +35,7 @@ export interface DefaultApiInterface {
3535 addPet ( params : {
3636 pathParams : { storeId : string } ;
3737 petDto ?: PetDto ;
38- } ) : Promise < void > ;
38+ } & RequestCallOptions ) : Promise < void > ;
3939 /**
4040 *
4141 * @param {* } [params] Request parameters, including pathParams, queryParams (including bodyParams) and http options.
@@ -44,12 +44,12 @@ export interface DefaultApiInterface {
4444 addPetWithForm ( params : {
4545 pathParams : { petId : string } ;
4646 formParams : { name : string ; status : string ; }
47- } ) : Promise < void > ;
47+ } & RequestCallOptions ) : Promise < void > ;
4848 /**
4949 *
5050 * @throws {HttpError }
5151 */
52- getPetLocations ( ) : Promise < PetLocationsDto > ;
52+ getPetLocations ( params ?: RequestCallOptions ) : Promise < PetLocationsDto > ;
5353 /**
5454 *
5555 * @param {* } [params] Request parameters, including pathParams, queryParams (including bodyParams) and http options.
@@ -58,7 +58,7 @@ export interface DefaultApiInterface {
5858 listPets ( params : {
5959 pathParams : { storeId : string } ;
6060 queryParams ?: { status ?: Array < string > , tags ?: Array < string > , bornAfter ?: Date , } ;
61- } ) : Promise < PetDto > ;
61+ } & RequestCallOptions ) : Promise < PetDto > ;
6262}
6363
6464/**
@@ -73,13 +73,15 @@ export class DefaultApi extends BaseAPI implements DefaultApiInterface {
7373 public async addPet ( params : {
7474 pathParams : { storeId : string } ;
7575 petDto ?: PetDto ;
76- } ) : Promise < void > {
76+ } & RequestCallOptions ) : Promise < void > {
7777 return await this . fetch (
7878 this . url ( "/{storeId}/pets" , params . pathParams ) ,
7979 {
80+ ...params ,
8081 method : "POST" ,
8182 body : JSON . stringify ( params . petDto ) ,
8283 headers : {
84+ ...this . removeEmpty ( params . headers ) ,
8385 "Content-Type" : "application/json" ,
8486 } ,
8587 }
@@ -93,13 +95,15 @@ export class DefaultApi extends BaseAPI implements DefaultApiInterface {
9395 public async addPetWithForm ( params : {
9496 pathParams : { petId : string } ;
9597 formParams : { name : string ; status : string ; }
96- } ) : Promise < void > {
98+ } & RequestCallOptions ) : Promise < void > {
9799 return await this . fetch (
98100 this . url ( "/pets/{petId}" , params . pathParams ) ,
99101 {
102+ ...params ,
100103 method : "POST" ,
101104 body : this . formData ( params . formParams ) ,
102105 headers : {
106+ ...this . removeEmpty ( params . headers ) ,
103107 "Content-Type" : "application/x-www-form-urlencoded" ,
104108 } ,
105109 }
@@ -109,9 +113,9 @@ export class DefaultApi extends BaseAPI implements DefaultApiInterface {
109113 *
110114 * @throws {HttpError }
111115 */
112- public async getPetLocations ( ) : Promise < PetLocationsDto > {
116+ public async getPetLocations ( params : RequestCallOptions = { } ) : Promise < PetLocationsDto > {
113117 return await this . fetch (
114- this . basePath + "/pet/locations"
118+ this . basePath + "/pet/locations" , params
115119 ) ;
116120 }
117121 /**
@@ -122,12 +126,12 @@ export class DefaultApi extends BaseAPI implements DefaultApiInterface {
122126 public async listPets ( params : {
123127 pathParams : { storeId : string } ;
124128 queryParams ?: { status ?: Array < string > , tags ?: Array < string > , bornAfter ?: Date , } ;
125- } ) : Promise < PetDto > {
129+ } & RequestCallOptions ) : Promise < PetDto > {
126130 return await this . fetch (
127131 this . url ( "/{storeId}/pets" , params . pathParams , params ?. queryParams , {
128132 status : { delimiter : " " } ,
129133 bornAfter : { format : "date" } ,
130- } )
134+ } ) , params
131135 ) ;
132136 }
133137}
0 commit comments