@@ -30,8 +30,8 @@ impl PetApiClient {
30
30
pub trait PetApi {
31
31
fn add_pet ( & self , pet : :: models:: Pet ) -> Result < ( ) , Error > ;
32
32
fn delete_pet ( & self , pet_id : i64 , api_key : & str ) -> Result < ( ) , Error > ;
33
- fn find_pets_by_status ( & self , status : Vec < String > ) -> Result < Vec < :: models:: Pet > , Error > ;
34
- fn find_pets_by_tags ( & self , tags : Vec < String > ) -> Result < Vec < :: models:: Pet > , Error > ;
33
+ fn find_pets_by_status ( & self , status : Vec < Vec < String > > ) -> Result < Vec < :: models:: Pet > , Error > ;
34
+ fn find_pets_by_tags ( & self , tags : Vec < Vec < String > > ) -> Result < Vec < :: models:: Pet > , Error > ;
35
35
fn get_pet_by_id ( & self , pet_id : i64 ) -> Result < :: models:: Pet , Error > ;
36
36
fn update_pet ( & self , pet : :: models:: Pet ) -> Result < ( ) , Error > ;
37
37
fn update_pet_with_form ( & self , pet_id : i64 , name : & str , status : & str ) -> Result < ( ) , Error > ;
@@ -46,7 +46,7 @@ impl PetApi for PetApiClient {
46
46
47
47
let query_string = {
48
48
let mut query = :: url:: form_urlencoded:: Serializer :: new ( String :: new ( ) ) ;
49
-
49
+
50
50
query. finish ( )
51
51
} ;
52
52
let uri_str = format ! ( "{}/pet?{}" , configuration. base_path, query_string) ;
@@ -65,6 +65,7 @@ impl PetApi for PetApiClient {
65
65
66
66
req_builder = req_builder. json ( & pet) ;
67
67
68
+
68
69
// send request
69
70
let req = req_builder. build ( ) ?;
70
71
@@ -78,7 +79,7 @@ impl PetApi for PetApiClient {
78
79
79
80
let query_string = {
80
81
let mut query = :: url:: form_urlencoded:: Serializer :: new ( String :: new ( ) ) ;
81
-
82
+
82
83
query. finish ( )
83
84
} ;
84
85
let uri_str = format ! ( "{}/pet/{petId}?{}" , configuration. base_path, query_string, petId=pet_id) ;
@@ -97,21 +98,22 @@ impl PetApi for PetApiClient {
97
98
} ;
98
99
99
100
101
+
100
102
// send request
101
103
let req = req_builder. build ( ) ?;
102
104
103
105
client. execute ( req) ?. error_for_status ( ) ?;
104
106
Ok ( ( ) )
105
107
}
106
108
107
- fn find_pets_by_status ( & self , status : Vec < String > ) -> Result < Vec < :: models:: Pet > , Error > {
109
+ fn find_pets_by_status ( & self , status : Vec < Vec < String > > ) -> Result < Vec < :: models:: Pet > , Error > {
108
110
let configuration: & configuration:: Configuration = self . configuration . borrow ( ) ;
109
111
let client = & configuration. client ;
110
112
111
113
let query_string = {
112
114
let mut query = :: url:: form_urlencoded:: Serializer :: new ( String :: new ( ) ) ;
113
115
query. append_pair ( "status" , & status. into_iter ( ) . map ( |p| p. to_string ( ) ) . collect :: < Vec < String > > ( ) . join ( "," ) . to_string ( ) ) ;
114
-
116
+
115
117
query. finish ( )
116
118
} ;
117
119
let uri_str = format ! ( "{}/pet/findByStatus?{}" , configuration. base_path, query_string) ;
@@ -129,20 +131,21 @@ impl PetApi for PetApiClient {
129
131
} ;
130
132
131
133
134
+
132
135
// send request
133
136
let req = req_builder. build ( ) ?;
134
137
135
138
Ok ( client. execute ( req) ?. error_for_status ( ) ?. json ( ) ?)
136
139
}
137
140
138
- fn find_pets_by_tags ( & self , tags : Vec < String > ) -> Result < Vec < :: models:: Pet > , Error > {
141
+ fn find_pets_by_tags ( & self , tags : Vec < Vec < String > > ) -> Result < Vec < :: models:: Pet > , Error > {
139
142
let configuration: & configuration:: Configuration = self . configuration . borrow ( ) ;
140
143
let client = & configuration. client ;
141
144
142
145
let query_string = {
143
146
let mut query = :: url:: form_urlencoded:: Serializer :: new ( String :: new ( ) ) ;
144
147
query. append_pair ( "tags" , & tags. into_iter ( ) . map ( |p| p. to_string ( ) ) . collect :: < Vec < String > > ( ) . join ( "," ) . to_string ( ) ) ;
145
-
148
+
146
149
query. finish ( )
147
150
} ;
148
151
let uri_str = format ! ( "{}/pet/findByTags?{}" , configuration. base_path, query_string) ;
@@ -160,6 +163,7 @@ impl PetApi for PetApiClient {
160
163
} ;
161
164
162
165
166
+
163
167
// send request
164
168
let req = req_builder. build ( ) ?;
165
169
@@ -172,7 +176,7 @@ impl PetApi for PetApiClient {
172
176
173
177
let query_string = {
174
178
let mut query = :: url:: form_urlencoded:: Serializer :: new ( String :: new ( ) ) ;
175
-
179
+
176
180
query. finish ( )
177
181
} ;
178
182
let uri_str = format ! ( "{}/pet/{petId}?{}" , configuration. base_path, query_string, petId=pet_id) ;
@@ -196,6 +200,7 @@ impl PetApi for PetApiClient {
196
200
197
201
198
202
203
+
199
204
// send request
200
205
let req = req_builder. build ( ) ?;
201
206
@@ -208,7 +213,7 @@ impl PetApi for PetApiClient {
208
213
209
214
let query_string = {
210
215
let mut query = :: url:: form_urlencoded:: Serializer :: new ( String :: new ( ) ) ;
211
-
216
+
212
217
query. finish ( )
213
218
} ;
214
219
let uri_str = format ! ( "{}/pet?{}" , configuration. base_path, query_string) ;
@@ -227,6 +232,7 @@ impl PetApi for PetApiClient {
227
232
228
233
req_builder = req_builder. json ( & pet) ;
229
234
235
+
230
236
// send request
231
237
let req = req_builder. build ( ) ?;
232
238
@@ -238,9 +244,13 @@ impl PetApi for PetApiClient {
238
244
let configuration: & configuration:: Configuration = self . configuration . borrow ( ) ;
239
245
let client = & configuration. client ;
240
246
247
+ let form = [
248
+ ( "name" , & name. to_string ( ) ) ,
249
+ ( "status" , & status. to_string ( ) ) ,
250
+ ] ;
241
251
let query_string = {
242
252
let mut query = :: url:: form_urlencoded:: Serializer :: new ( String :: new ( ) ) ;
243
-
253
+
244
254
query. finish ( )
245
255
} ;
246
256
let uri_str = format ! ( "{}/pet/{petId}?{}" , configuration. base_path, query_string, petId=pet_id) ;
@@ -258,6 +268,8 @@ impl PetApi for PetApiClient {
258
268
} ;
259
269
260
270
271
+ req_builder = req_builder. form ( & form) ;
272
+
261
273
// send request
262
274
let req = req_builder. build ( ) ?;
263
275
@@ -269,9 +281,13 @@ impl PetApi for PetApiClient {
269
281
let configuration: & configuration:: Configuration = self . configuration . borrow ( ) ;
270
282
let client = & configuration. client ;
271
283
284
+ let form = [
285
+ ( "additionalMetadata" , & additional_metadata. to_string ( ) ) ,
286
+ ( "file" , & file. to_string ( ) ) ,
287
+ ] ;
272
288
let query_string = {
273
289
let mut query = :: url:: form_urlencoded:: Serializer :: new ( String :: new ( ) ) ;
274
-
290
+
275
291
query. finish ( )
276
292
} ;
277
293
let uri_str = format ! ( "{}/pet/{petId}/uploadImage?{}" , configuration. base_path, query_string, petId=pet_id) ;
@@ -289,6 +305,8 @@ impl PetApi for PetApiClient {
289
305
} ;
290
306
291
307
308
+ req_builder = req_builder. form ( & form) ;
309
+
292
310
// send request
293
311
let req = req_builder. build ( ) ?;
294
312
0 commit comments