@@ -8,7 +8,11 @@ def self.escapeString(string)
8
8
URI . encode ( string . to_s )
9
9
end
10
10
11
-
11
+
12
+ # Update an existing pet
13
+ #
14
+ # @param body Pet object that needs to be added to the store
15
+ # @return void
12
16
def self . updatePet ( body , opts = { } )
13
17
query_param_keys = [ ]
14
18
@@ -32,7 +36,6 @@ def self.updatePet (body, opts={})
32
36
headers = { }
33
37
34
38
35
-
36
39
# http body (model)
37
40
post_body = nil
38
41
@@ -47,7 +50,6 @@ def self.updatePet (body, opts={})
47
50
end
48
51
end
49
52
post_body = array
50
-
51
53
else
52
54
if body . respond_to? ( "to_body" . to_sym )
53
55
post_body = body . to_body
@@ -57,19 +59,20 @@ def self.updatePet (body, opts={})
57
59
end
58
60
end
59
61
60
-
61
62
# form parameters
62
63
form_parameter_hash = { }
63
64
64
-
65
65
66
66
67
67
Swagger ::Request . new ( :PUT , path , { :params => queryopts , :headers => headers , :body => post_body , :form_params => form_parameter_hash } ) . make
68
68
69
69
70
70
end
71
71
72
-
72
+ # Add a new pet to the store
73
+ #
74
+ # @param body Pet object that needs to be added to the store
75
+ # @return void
73
76
def self . addPet ( body , opts = { } )
74
77
query_param_keys = [ ]
75
78
@@ -93,7 +96,6 @@ def self.addPet (body, opts={})
93
96
headers = { }
94
97
95
98
96
-
97
99
# http body (model)
98
100
post_body = nil
99
101
@@ -108,7 +110,6 @@ def self.addPet (body, opts={})
108
110
end
109
111
end
110
112
post_body = array
111
-
112
113
else
113
114
if body . respond_to? ( "to_body" . to_sym )
114
115
post_body = body . to_body
@@ -118,19 +119,20 @@ def self.addPet (body, opts={})
118
119
end
119
120
end
120
121
121
-
122
122
# form parameters
123
123
form_parameter_hash = { }
124
124
125
-
126
125
127
126
128
127
Swagger ::Request . new ( :POST , path , { :params => queryopts , :headers => headers , :body => post_body , :form_params => form_parameter_hash } ) . make
129
128
130
129
131
130
end
132
131
133
-
132
+ # Finds Pets by status
133
+ # Multiple status values can be provided with comma seperated strings
134
+ # @param status Status values that need to be considered for filter
135
+ # @return array[Pet]
134
136
def self . findPetsByStatus ( status , opts = { } )
135
137
query_param_keys = [ :status ]
136
138
@@ -154,15 +156,12 @@ def self.findPetsByStatus (status, opts={})
154
156
headers = { }
155
157
156
158
157
-
158
159
# http body (model)
159
160
post_body = nil
160
161
161
-
162
162
# form parameters
163
163
form_parameter_hash = { }
164
164
165
-
166
165
167
166
response = Swagger ::Request . new ( :GET , path , { :params => queryopts , :headers => headers , :body => post_body , :form_params => form_parameter_hash } ) . make . body
168
167
@@ -172,7 +171,10 @@ def self.findPetsByStatus (status, opts={})
172
171
173
172
end
174
173
175
-
174
+ # Finds Pets by tags
175
+ # Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
176
+ # @param tags Tags to filter by
177
+ # @return array[Pet]
176
178
def self . findPetsByTags ( tags , opts = { } )
177
179
query_param_keys = [ :tags ]
178
180
@@ -196,15 +198,12 @@ def self.findPetsByTags (tags, opts={})
196
198
headers = { }
197
199
198
200
199
-
200
201
# http body (model)
201
202
post_body = nil
202
203
203
-
204
204
# form parameters
205
205
form_parameter_hash = { }
206
206
207
-
208
207
209
208
response = Swagger ::Request . new ( :GET , path , { :params => queryopts , :headers => headers , :body => post_body , :form_params => form_parameter_hash } ) . make . body
210
209
@@ -214,7 +213,10 @@ def self.findPetsByTags (tags, opts={})
214
213
215
214
end
216
215
217
-
216
+ # Find pet by ID
217
+ # Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
218
+ # @param pet_id ID of pet that needs to be fetched
219
+ # @return Pet
218
220
def self . getPetById ( pet_id , opts = { } )
219
221
query_param_keys = [ ]
220
222
@@ -239,15 +241,12 @@ def self.getPetById (pet_id, opts={})
239
241
headers = { }
240
242
241
243
242
-
243
244
# http body (model)
244
245
post_body = nil
245
246
246
-
247
247
# form parameters
248
248
form_parameter_hash = { }
249
249
250
-
251
250
252
251
response = Swagger ::Request . new ( :GET , path , { :params => queryopts , :headers => headers , :body => post_body , :form_params => form_parameter_hash } ) . make . body
253
252
Pet . new ( response )
@@ -256,7 +255,12 @@ def self.getPetById (pet_id, opts={})
256
255
257
256
end
258
257
259
-
258
+ # Updates a pet in the store with form data
259
+ #
260
+ # @param pet_id ID of pet that needs to be updated
261
+ # @param name Updated name of the pet
262
+ # @param status Updated status of the pet
263
+ # @return void
260
264
def self . updatePetWithForm ( pet_id , name , status , opts = { } )
261
265
query_param_keys = [ ]
262
266
@@ -283,25 +287,26 @@ def self.updatePetWithForm (pet_id,name,status, opts={})
283
287
headers = { }
284
288
285
289
286
-
287
290
# http body (model)
288
291
post_body = nil
289
292
290
-
291
293
# form parameters
292
294
form_parameter_hash = { }
293
295
294
296
form_parameter_hash [ "name" ] = name
295
297
form_parameter_hash [ "status" ] = status
296
-
297
298
298
299
299
300
Swagger ::Request . new ( :POST , path , { :params => queryopts , :headers => headers , :body => post_body , :form_params => form_parameter_hash } ) . make
300
301
301
302
302
303
end
303
304
304
-
305
+ # Deletes a pet
306
+ #
307
+ # @param api_key
308
+ # @param pet_id Pet id to delete
309
+ # @return void
305
310
def self . deletePet ( api_key , pet_id , opts = { } )
306
311
query_param_keys = [ ]
307
312
@@ -327,23 +332,25 @@ def self.deletePet (api_key,pet_id, opts={})
327
332
headers = { }
328
333
329
334
headers [ :'api_key' ] = api_key
330
-
331
335
# http body (model)
332
336
post_body = nil
333
337
334
-
335
338
# form parameters
336
339
form_parameter_hash = { }
337
340
338
-
339
341
340
342
341
343
Swagger ::Request . new ( :DELETE , path , { :params => queryopts , :headers => headers , :body => post_body , :form_params => form_parameter_hash } ) . make
342
344
343
345
344
346
end
345
347
346
-
348
+ # uploads an image
349
+ #
350
+ # @param pet_id ID of pet to update
351
+ # @param additional_metadata Additional data to pass to server
352
+ # @param file file to upload
353
+ # @return void
347
354
def self . uploadFile ( pet_id , additional_metadata , file , opts = { } )
348
355
query_param_keys = [ ]
349
356
@@ -370,22 +377,18 @@ def self.uploadFile (pet_id,additional_metadata,file, opts={})
370
377
headers = { }
371
378
372
379
373
-
374
380
# http body (model)
375
381
post_body = nil
376
382
377
-
378
383
# form parameters
379
384
form_parameter_hash = { }
380
385
381
386
form_parameter_hash [ "additionalMetadata" ] = additional_metadata
382
387
form_parameter_hash [ "file" ] = file
383
-
384
388
385
389
386
390
Swagger ::Request . new ( :POST , path , { :params => queryopts , :headers => headers , :body => post_body , :form_params => form_parameter_hash } ) . make
387
391
388
392
389
393
end
390
-
391
394
end
0 commit comments