@@ -59,8 +59,8 @@ public Pet getPetById (Long petId) throws ApiException {
59
59
}
60
60
}
61
61
}
62
- //error info- code: 400 reason: "Invalid pet value " model: <none>
63
- public void deletePet (String petId ) throws ApiException {
62
+ //error info- code: 405 reason: "Invalid input " model: <none>
63
+ public void updatePetWithForm (String petId , String name , String status ) throws ApiException {
64
64
// verify required params are set
65
65
if (petId == null ) {
66
66
throw new ApiException (400 , "missing required params" );
@@ -75,7 +75,7 @@ public void deletePet (String petId) throws ApiException {
75
75
String contentType = "application/json" ;
76
76
77
77
try {
78
- String response = apiInvoker .invokeAPI (basePath , path , "DELETE " , queryParams , null , headerParams , contentType );
78
+ String response = apiInvoker .invokeAPI (basePath , path , "POST " , queryParams , null , headerParams , contentType );
79
79
if (response != null ){
80
80
return ;
81
81
}
@@ -91,40 +91,8 @@ public void deletePet (String petId) throws ApiException {
91
91
}
92
92
}
93
93
}
94
- //error info- code: 400 reason: "Invalid tag value" model: <none>
95
- public List <Pet > partialUpdate (String petId , Pet body ) throws ApiException {
96
- // verify required params are set
97
- if (petId == null || body == null ) {
98
- throw new ApiException (400 , "missing required params" );
99
- }
100
- // create path and map variables
101
- String path = "/pet/{petId}" .replaceAll ("\\ {format\\ }" ,"json" ).replaceAll ("\\ {" + "petId" + "\\ }" , apiInvoker .escapeString (petId .toString ()));
102
-
103
- // query params
104
- Map <String , String > queryParams = new HashMap <String , String >();
105
- Map <String , String > headerParams = new HashMap <String , String >();
106
-
107
- String contentType = "application/json" ;
108
-
109
- try {
110
- String response = apiInvoker .invokeAPI (basePath , path , "PATCH" , queryParams , body , headerParams , contentType );
111
- if (response != null ){
112
- return (List <Pet >) ApiInvoker .deserialize (response , "Array" , Pet .class );
113
- }
114
- else {
115
- return null ;
116
- }
117
- } catch (ApiException ex ) {
118
- if (ex .getCode () == 404 ) {
119
- return null ;
120
- }
121
- else {
122
- throw ex ;
123
- }
124
- }
125
- }
126
- //error info- code: 405 reason: "Invalid input" model: <none>
127
- public void updatePetWithForm (String petId , String name , String status ) throws ApiException {
94
+ //error info- code: 400 reason: "Invalid pet value" model: <none>
95
+ public void deletePet (String petId ) throws ApiException {
128
96
// verify required params are set
129
97
if (petId == null ) {
130
98
throw new ApiException (400 , "missing required params" );
@@ -139,7 +107,7 @@ public void updatePetWithForm (String petId, String name, String status) throws
139
107
String contentType = "application/json" ;
140
108
141
109
try {
142
- String response = apiInvoker .invokeAPI (basePath , path , "POST " , queryParams , null , headerParams , contentType );
110
+ String response = apiInvoker .invokeAPI (basePath , path , "DELETE " , queryParams , null , headerParams , contentType );
143
111
if (response != null ){
144
112
return ;
145
113
}
@@ -155,9 +123,14 @@ public void updatePetWithForm (String petId, String name, String status) throws
155
123
}
156
124
}
157
125
}
158
- public void uploadFile (String additionalMetadata , File body ) throws ApiException {
126
+ //error info- code: 400 reason: "Invalid tag value" model: <none>
127
+ public List <Pet > partialUpdate (String petId , Pet body ) throws ApiException {
128
+ // verify required params are set
129
+ if (petId == null || body == null ) {
130
+ throw new ApiException (400 , "missing required params" );
131
+ }
159
132
// create path and map variables
160
- String path = "/pet/uploadImage " .replaceAll ("\\ {format\\ }" ,"json" );
133
+ String path = "/pet/{petId} " .replaceAll ("\\ {format\\ }" ,"json" ). replaceAll ( " \\ {" + "petId" + " \\ }" , apiInvoker . escapeString ( petId . toString ()) );
161
134
162
135
// query params
163
136
Map <String , String > queryParams = new HashMap <String , String >();
@@ -166,16 +139,16 @@ public void uploadFile (String additionalMetadata, File body) throws ApiExceptio
166
139
String contentType = "application/json" ;
167
140
168
141
try {
169
- String response = apiInvoker .invokeAPI (basePath , path , "POST " , queryParams , body , headerParams , contentType );
142
+ String response = apiInvoker .invokeAPI (basePath , path , "PATCH " , queryParams , body , headerParams , contentType );
170
143
if (response != null ){
171
- return ;
144
+ return ( List < Pet >) ApiInvoker . deserialize ( response , "List" , Pet . class ) ;
172
145
}
173
146
else {
174
- return ;
147
+ return null ;
175
148
}
176
149
} catch (ApiException ex ) {
177
150
if (ex .getCode () == 404 ) {
178
- return ;
151
+ return null ;
179
152
}
180
153
else {
181
154
throw ex ;
@@ -268,7 +241,7 @@ public List<Pet> findPetsByStatus (String status) throws ApiException {
268
241
try {
269
242
String response = apiInvoker .invokeAPI (basePath , path , "GET" , queryParams , null , headerParams , contentType );
270
243
if (response != null ){
271
- return (List <Pet >) ApiInvoker .deserialize (response , "Array " , Pet .class );
244
+ return (List <Pet >) ApiInvoker .deserialize (response , "List " , Pet .class );
272
245
}
273
246
else {
274
247
return null ;
@@ -302,7 +275,7 @@ public List<Pet> findPetsByTags (String tags) throws ApiException {
302
275
try {
303
276
String response = apiInvoker .invokeAPI (basePath , path , "GET" , queryParams , null , headerParams , contentType );
304
277
if (response != null ){
305
- return (List <Pet >) ApiInvoker .deserialize (response , "Array " , Pet .class );
278
+ return (List <Pet >) ApiInvoker .deserialize (response , "List " , Pet .class );
306
279
}
307
280
else {
308
281
return null ;
@@ -316,5 +289,32 @@ public List<Pet> findPetsByTags (String tags) throws ApiException {
316
289
}
317
290
}
318
291
}
292
+ public void uploadFile (String additionalMetadata , File file ) throws ApiException {
293
+ // create path and map variables
294
+ String path = "/pet/uploadImage" .replaceAll ("\\ {format\\ }" ,"json" );
295
+
296
+ // query params
297
+ Map <String , String > queryParams = new HashMap <String , String >();
298
+ Map <String , String > headerParams = new HashMap <String , String >();
299
+
300
+ String contentType = "application/json" ;
301
+
302
+ try {
303
+ String response = apiInvoker .invokeAPI (basePath , path , "POST" , queryParams , null , headerParams , contentType );
304
+ if (response != null ){
305
+ return ;
306
+ }
307
+ else {
308
+ return ;
309
+ }
310
+ } catch (ApiException ex ) {
311
+ if (ex .getCode () == 404 ) {
312
+ return ;
313
+ }
314
+ else {
315
+ throw ex ;
316
+ }
317
+ }
318
+ }
319
319
}
320
320
0 commit comments