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