@@ -36,7 +36,7 @@ export const COLLECTION_FORMATS = {
36
36
* @interface FetchAPI
37
37
*/
38
38
export interface FetchAPI {
39
- ( url : string , init ?: any ) : Promise < any > ;
39
+ ( url : string , init ?: any ) : Promise < Response > ;
40
40
}
41
41
42
42
/**
@@ -360,7 +360,8 @@ export const PetApiFetchParamCreator = function (configuration?: Configuration)
360
360
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
361
361
delete localVarUrlObj . search ;
362
362
localVarRequestOptions . headers = Object . assign ( { } , localVarHeaderParameter , options . headers ) ;
363
- localVarRequestOptions . body = JSON . stringify ( body || { } ) ;
363
+ const needsSerialization = ( < any > "Pet" !== "string" ) || localVarRequestOptions . headers [ 'Content-Type' ] === 'application/json' ;
364
+ localVarRequestOptions . body = needsSerialization ? JSON . stringify ( body || { } ) : ( body || "" ) ;
364
365
365
366
return {
366
367
url : url . format ( localVarUrlObj ) ,
@@ -562,7 +563,8 @@ export const PetApiFetchParamCreator = function (configuration?: Configuration)
562
563
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
563
564
delete localVarUrlObj . search ;
564
565
localVarRequestOptions . headers = Object . assign ( { } , localVarHeaderParameter , options . headers ) ;
565
- localVarRequestOptions . body = JSON . stringify ( body || { } ) ;
566
+ const needsSerialization = ( < any > "Pet" !== "string" ) || localVarRequestOptions . headers [ 'Content-Type' ] === 'application/json' ;
567
+ localVarRequestOptions . body = needsSerialization ? JSON . stringify ( body || { } ) : ( body || "" ) ;
566
568
567
569
return {
568
570
url : url . format ( localVarUrlObj ) ,
@@ -689,7 +691,7 @@ export const PetApiFp = function(configuration?: Configuration) {
689
691
* @param {* } [options] Override http request option.
690
692
* @throws {RequiredError }
691
693
*/
692
- addPet ( body : Pet , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < any > {
694
+ addPet ( body : Pet , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < Response > {
693
695
const localVarFetchArgs = PetApiFetchParamCreator ( configuration ) . addPet ( body , options ) ;
694
696
return ( fetch : FetchAPI = portableFetch , basePath : string = BASE_PATH ) => {
695
697
return fetch ( basePath + localVarFetchArgs . url , localVarFetchArgs . options ) . then ( ( response ) => {
@@ -709,7 +711,7 @@ export const PetApiFp = function(configuration?: Configuration) {
709
711
* @param {* } [options] Override http request option.
710
712
* @throws {RequiredError }
711
713
*/
712
- deletePet ( petId : number , apiKey ?: string , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < any > {
714
+ deletePet ( petId : number , apiKey ?: string , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < Response > {
713
715
const localVarFetchArgs = PetApiFetchParamCreator ( configuration ) . deletePet ( petId , apiKey , options ) ;
714
716
return ( fetch : FetchAPI = portableFetch , basePath : string = BASE_PATH ) => {
715
717
return fetch ( basePath + localVarFetchArgs . url , localVarFetchArgs . options ) . then ( ( response ) => {
@@ -785,7 +787,7 @@ export const PetApiFp = function(configuration?: Configuration) {
785
787
* @param {* } [options] Override http request option.
786
788
* @throws {RequiredError }
787
789
*/
788
- updatePet ( body : Pet , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < any > {
790
+ updatePet ( body : Pet , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < Response > {
789
791
const localVarFetchArgs = PetApiFetchParamCreator ( configuration ) . updatePet ( body , options ) ;
790
792
return ( fetch : FetchAPI = portableFetch , basePath : string = BASE_PATH ) => {
791
793
return fetch ( basePath + localVarFetchArgs . url , localVarFetchArgs . options ) . then ( ( response ) => {
@@ -806,7 +808,7 @@ export const PetApiFp = function(configuration?: Configuration) {
806
808
* @param {* } [options] Override http request option.
807
809
* @throws {RequiredError }
808
810
*/
809
- updatePetWithForm ( petId : number , name ?: string , status ?: string , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < any > {
811
+ updatePetWithForm ( petId : number , name ?: string , status ?: string , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < Response > {
810
812
const localVarFetchArgs = PetApiFetchParamCreator ( configuration ) . updatePetWithForm ( petId , name , status , options ) ;
811
813
return ( fetch : FetchAPI = portableFetch , basePath : string = BASE_PATH ) => {
812
814
return fetch ( basePath + localVarFetchArgs . url , localVarFetchArgs . options ) . then ( ( response ) => {
@@ -1165,7 +1167,8 @@ export const StoreApiFetchParamCreator = function (configuration?: Configuration
1165
1167
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1166
1168
delete localVarUrlObj . search ;
1167
1169
localVarRequestOptions . headers = Object . assign ( { } , localVarHeaderParameter , options . headers ) ;
1168
- localVarRequestOptions . body = JSON . stringify ( body || { } ) ;
1170
+ const needsSerialization = ( < any > "Order" !== "string" ) || localVarRequestOptions . headers [ 'Content-Type' ] === 'application/json' ;
1171
+ localVarRequestOptions . body = needsSerialization ? JSON . stringify ( body || { } ) : ( body || "" ) ;
1169
1172
1170
1173
return {
1171
1174
url : url . format ( localVarUrlObj ) ,
@@ -1188,7 +1191,7 @@ export const StoreApiFp = function(configuration?: Configuration) {
1188
1191
* @param {* } [options] Override http request option.
1189
1192
* @throws {RequiredError }
1190
1193
*/
1191
- deleteOrder ( orderId : string , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < any > {
1194
+ deleteOrder ( orderId : string , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < Response > {
1192
1195
const localVarFetchArgs = StoreApiFetchParamCreator ( configuration ) . deleteOrder ( orderId , options ) ;
1193
1196
return ( fetch : FetchAPI = portableFetch , basePath : string = BASE_PATH ) => {
1194
1197
return fetch ( basePath + localVarFetchArgs . url , localVarFetchArgs . options ) . then ( ( response ) => {
@@ -1393,7 +1396,8 @@ export const UserApiFetchParamCreator = function (configuration?: Configuration)
1393
1396
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1394
1397
delete localVarUrlObj . search ;
1395
1398
localVarRequestOptions . headers = Object . assign ( { } , localVarHeaderParameter , options . headers ) ;
1396
- localVarRequestOptions . body = JSON . stringify ( body || { } ) ;
1399
+ const needsSerialization = ( < any > "User" !== "string" ) || localVarRequestOptions . headers [ 'Content-Type' ] === 'application/json' ;
1400
+ localVarRequestOptions . body = needsSerialization ? JSON . stringify ( body || { } ) : ( body || "" ) ;
1397
1401
1398
1402
return {
1399
1403
url : url . format ( localVarUrlObj ) ,
@@ -1424,7 +1428,8 @@ export const UserApiFetchParamCreator = function (configuration?: Configuration)
1424
1428
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1425
1429
delete localVarUrlObj . search ;
1426
1430
localVarRequestOptions . headers = Object . assign ( { } , localVarHeaderParameter , options . headers ) ;
1427
- localVarRequestOptions . body = JSON . stringify ( body || { } ) ;
1431
+ const needsSerialization = ( < any > "Array<User>" !== "string" ) || localVarRequestOptions . headers [ 'Content-Type' ] === 'application/json' ;
1432
+ localVarRequestOptions . body = needsSerialization ? JSON . stringify ( body || { } ) : ( body || "" ) ;
1428
1433
1429
1434
return {
1430
1435
url : url . format ( localVarUrlObj ) ,
@@ -1455,7 +1460,8 @@ export const UserApiFetchParamCreator = function (configuration?: Configuration)
1455
1460
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1456
1461
delete localVarUrlObj . search ;
1457
1462
localVarRequestOptions . headers = Object . assign ( { } , localVarHeaderParameter , options . headers ) ;
1458
- localVarRequestOptions . body = JSON . stringify ( body || { } ) ;
1463
+ const needsSerialization = ( < any > "Array<User>" !== "string" ) || localVarRequestOptions . headers [ 'Content-Type' ] === 'application/json' ;
1464
+ localVarRequestOptions . body = needsSerialization ? JSON . stringify ( body || { } ) : ( body || "" ) ;
1459
1465
1460
1466
return {
1461
1467
url : url . format ( localVarUrlObj ) ,
@@ -1614,7 +1620,8 @@ export const UserApiFetchParamCreator = function (configuration?: Configuration)
1614
1620
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
1615
1621
delete localVarUrlObj . search ;
1616
1622
localVarRequestOptions . headers = Object . assign ( { } , localVarHeaderParameter , options . headers ) ;
1617
- localVarRequestOptions . body = JSON . stringify ( body || { } ) ;
1623
+ const needsSerialization = ( < any > "User" !== "string" ) || localVarRequestOptions . headers [ 'Content-Type' ] === 'application/json' ;
1624
+ localVarRequestOptions . body = needsSerialization ? JSON . stringify ( body || { } ) : ( body || "" ) ;
1618
1625
1619
1626
return {
1620
1627
url : url . format ( localVarUrlObj ) ,
@@ -1637,7 +1644,7 @@ export const UserApiFp = function(configuration?: Configuration) {
1637
1644
* @param {* } [options] Override http request option.
1638
1645
* @throws {RequiredError }
1639
1646
*/
1640
- createUser ( body : User , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < any > {
1647
+ createUser ( body : User , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < Response > {
1641
1648
const localVarFetchArgs = UserApiFetchParamCreator ( configuration ) . createUser ( body , options ) ;
1642
1649
return ( fetch : FetchAPI = portableFetch , basePath : string = BASE_PATH ) => {
1643
1650
return fetch ( basePath + localVarFetchArgs . url , localVarFetchArgs . options ) . then ( ( response ) => {
@@ -1656,7 +1663,7 @@ export const UserApiFp = function(configuration?: Configuration) {
1656
1663
* @param {* } [options] Override http request option.
1657
1664
* @throws {RequiredError }
1658
1665
*/
1659
- createUsersWithArrayInput ( body : Array < User > , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < any > {
1666
+ createUsersWithArrayInput ( body : Array < User > , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < Response > {
1660
1667
const localVarFetchArgs = UserApiFetchParamCreator ( configuration ) . createUsersWithArrayInput ( body , options ) ;
1661
1668
return ( fetch : FetchAPI = portableFetch , basePath : string = BASE_PATH ) => {
1662
1669
return fetch ( basePath + localVarFetchArgs . url , localVarFetchArgs . options ) . then ( ( response ) => {
@@ -1675,7 +1682,7 @@ export const UserApiFp = function(configuration?: Configuration) {
1675
1682
* @param {* } [options] Override http request option.
1676
1683
* @throws {RequiredError }
1677
1684
*/
1678
- createUsersWithListInput ( body : Array < User > , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < any > {
1685
+ createUsersWithListInput ( body : Array < User > , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < Response > {
1679
1686
const localVarFetchArgs = UserApiFetchParamCreator ( configuration ) . createUsersWithListInput ( body , options ) ;
1680
1687
return ( fetch : FetchAPI = portableFetch , basePath : string = BASE_PATH ) => {
1681
1688
return fetch ( basePath + localVarFetchArgs . url , localVarFetchArgs . options ) . then ( ( response ) => {
@@ -1694,7 +1701,7 @@ export const UserApiFp = function(configuration?: Configuration) {
1694
1701
* @param {* } [options] Override http request option.
1695
1702
* @throws {RequiredError }
1696
1703
*/
1697
- deleteUser ( username : string , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < any > {
1704
+ deleteUser ( username : string , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < Response > {
1698
1705
const localVarFetchArgs = UserApiFetchParamCreator ( configuration ) . deleteUser ( username , options ) ;
1699
1706
return ( fetch : FetchAPI = portableFetch , basePath : string = BASE_PATH ) => {
1700
1707
return fetch ( basePath + localVarFetchArgs . url , localVarFetchArgs . options ) . then ( ( response ) => {
@@ -1751,7 +1758,7 @@ export const UserApiFp = function(configuration?: Configuration) {
1751
1758
* @param {* } [options] Override http request option.
1752
1759
* @throws {RequiredError }
1753
1760
*/
1754
- logoutUser ( options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < any > {
1761
+ logoutUser ( options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < Response > {
1755
1762
const localVarFetchArgs = UserApiFetchParamCreator ( configuration ) . logoutUser ( options ) ;
1756
1763
return ( fetch : FetchAPI = portableFetch , basePath : string = BASE_PATH ) => {
1757
1764
return fetch ( basePath + localVarFetchArgs . url , localVarFetchArgs . options ) . then ( ( response ) => {
@@ -1771,7 +1778,7 @@ export const UserApiFp = function(configuration?: Configuration) {
1771
1778
* @param {* } [options] Override http request option.
1772
1779
* @throws {RequiredError }
1773
1780
*/
1774
- updateUser ( username : string , body : User , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < any > {
1781
+ updateUser ( username : string , body : User , options ?: any ) : ( fetch ?: FetchAPI , basePath ?: string ) => Promise < Response > {
1775
1782
const localVarFetchArgs = UserApiFetchParamCreator ( configuration ) . updateUser ( username , body , options ) ;
1776
1783
return ( fetch : FetchAPI = portableFetch , basePath : string = BASE_PATH ) => {
1777
1784
return fetch ( basePath + localVarFetchArgs . url , localVarFetchArgs . options ) . then ( ( response ) => {
0 commit comments