@@ -33,7 +33,7 @@ def getPetById(self, petId, **kwargs):
33
33
"""Find pet by ID
34
34
35
35
Args:
36
- petId, str : ID of pet that needs to be fetched (required)
36
+ petId, int : ID of pet that needs to be fetched (required)
37
37
38
38
Returns: Pet
39
39
"""
@@ -47,7 +47,7 @@ def getPetById(self, petId, **kwargs):
47
47
params [key ] = val
48
48
del params ['kwargs' ]
49
49
50
- resourcePath = '/pet.{format} /{petId}'
50
+ resourcePath = '/pet/{petId}'
51
51
resourcePath = resourcePath .replace ('{format}' , 'json' )
52
52
method = 'GET'
53
53
@@ -70,6 +70,155 @@ def getPetById(self, petId, **kwargs):
70
70
return responseObject
71
71
72
72
73
+ def deletePet (self , petId , ** kwargs ):
74
+ """Deletes a pet
75
+
76
+ Args:
77
+ petId, str: Pet id to delete (required)
78
+
79
+ Returns:
80
+ """
81
+
82
+ allParams = ['petId' ]
83
+
84
+ params = locals ()
85
+ for (key , val ) in params ['kwargs' ].items ():
86
+ if key not in allParams :
87
+ raise TypeError ("Got an unexpected keyword argument '%s' to method deletePet" % key )
88
+ params [key ] = val
89
+ del params ['kwargs' ]
90
+
91
+ resourcePath = '/pet/{petId}'
92
+ resourcePath = resourcePath .replace ('{format}' , 'json' )
93
+ method = 'DELETE'
94
+
95
+ queryParams = {}
96
+ headerParams = {}
97
+
98
+ if ('petId' in params ):
99
+ replacement = str (self .apiClient .toPathValue (params ['petId' ]))
100
+ resourcePath = resourcePath .replace ('{' + 'petId' + '}' ,
101
+ replacement )
102
+ postData = (params ['body' ] if 'body' in params else None )
103
+
104
+ response = self .apiClient .callAPI (resourcePath , method , queryParams ,
105
+ postData , headerParams )
106
+
107
+
108
+
109
+ def partialUpdate (self , petId , body , ** kwargs ):
110
+ """partial updates to a pet
111
+
112
+ Args:
113
+ petId, str: ID of pet that needs to be fetched (required)
114
+ body, Pet: Pet object that needs to be added to the store (required)
115
+
116
+ Returns: Array[Pet]
117
+ """
118
+
119
+ allParams = ['petId' , 'body' ]
120
+
121
+ params = locals ()
122
+ for (key , val ) in params ['kwargs' ].items ():
123
+ if key not in allParams :
124
+ raise TypeError ("Got an unexpected keyword argument '%s' to method partialUpdate" % key )
125
+ params [key ] = val
126
+ del params ['kwargs' ]
127
+
128
+ resourcePath = '/pet/{petId}'
129
+ resourcePath = resourcePath .replace ('{format}' , 'json' )
130
+ method = 'PATCH'
131
+
132
+ queryParams = {}
133
+ headerParams = {}
134
+
135
+ if ('petId' in params ):
136
+ replacement = str (self .apiClient .toPathValue (params ['petId' ]))
137
+ resourcePath = resourcePath .replace ('{' + 'petId' + '}' ,
138
+ replacement )
139
+ postData = (params ['body' ] if 'body' in params else None )
140
+
141
+ response = self .apiClient .callAPI (resourcePath , method , queryParams ,
142
+ postData , headerParams )
143
+
144
+ if not response :
145
+ return None
146
+
147
+ responseObject = self .apiClient .deserialize (response , 'Array[Pet]' )
148
+ return responseObject
149
+
150
+
151
+ def updatePetWithForm (self , petId , ** kwargs ):
152
+ """Updates a pet in the store with form data
153
+
154
+ Args:
155
+ petId, str: ID of pet that needs to be updated (required)
156
+ name, str: Updated name of the pet (optional)
157
+ status, str: Updated status of the pet (optional)
158
+
159
+ Returns:
160
+ """
161
+
162
+ allParams = ['petId' , 'name' , 'status' ]
163
+
164
+ params = locals ()
165
+ for (key , val ) in params ['kwargs' ].items ():
166
+ if key not in allParams :
167
+ raise TypeError ("Got an unexpected keyword argument '%s' to method updatePetWithForm" % key )
168
+ params [key ] = val
169
+ del params ['kwargs' ]
170
+
171
+ resourcePath = '/pet/{petId}'
172
+ resourcePath = resourcePath .replace ('{format}' , 'json' )
173
+ method = 'POST'
174
+
175
+ queryParams = {}
176
+ headerParams = {}
177
+
178
+ if ('petId' in params ):
179
+ replacement = str (self .apiClient .toPathValue (params ['petId' ]))
180
+ resourcePath = resourcePath .replace ('{' + 'petId' + '}' ,
181
+ replacement )
182
+ postData = (params ['body' ] if 'body' in params else None )
183
+
184
+ response = self .apiClient .callAPI (resourcePath , method , queryParams ,
185
+ postData , headerParams )
186
+
187
+
188
+
189
+ def uploadFile (self , ** kwargs ):
190
+ """uploads an image
191
+
192
+ Args:
193
+ additionalMetadata, str: Additional data to pass to server (optional)
194
+ body, File: file to upload (optional)
195
+
196
+ Returns:
197
+ """
198
+
199
+ allParams = ['additionalMetadata' , 'body' ]
200
+
201
+ params = locals ()
202
+ for (key , val ) in params ['kwargs' ].items ():
203
+ if key not in allParams :
204
+ raise TypeError ("Got an unexpected keyword argument '%s' to method uploadFile" % key )
205
+ params [key ] = val
206
+ del params ['kwargs' ]
207
+
208
+ resourcePath = '/pet/uploadImage'
209
+ resourcePath = resourcePath .replace ('{format}' , 'json' )
210
+ method = 'POST'
211
+
212
+ queryParams = {}
213
+ headerParams = {}
214
+
215
+ postData = (params ['body' ] if 'body' in params else None )
216
+
217
+ response = self .apiClient .callAPI (resourcePath , method , queryParams ,
218
+ postData , headerParams )
219
+
220
+
221
+
73
222
def addPet (self , body , ** kwargs ):
74
223
"""Add a new pet to the store
75
224
@@ -88,7 +237,7 @@ def addPet(self, body, **kwargs):
88
237
params [key ] = val
89
238
del params ['kwargs' ]
90
239
91
- resourcePath = '/pet.{format} '
240
+ resourcePath = '/pet'
92
241
resourcePath = resourcePath .replace ('{format}' , 'json' )
93
242
method = 'POST'
94
243
@@ -120,7 +269,7 @@ def updatePet(self, body, **kwargs):
120
269
params [key ] = val
121
270
del params ['kwargs' ]
122
271
123
- resourcePath = '/pet.{format} '
272
+ resourcePath = '/pet'
124
273
resourcePath = resourcePath .replace ('{format}' , 'json' )
125
274
method = 'PUT'
126
275
@@ -140,7 +289,7 @@ def findPetsByStatus(self, status= None, **kwargs):
140
289
Args:
141
290
status, str: Status values that need to be considered for filter (required)
142
291
143
- Returns: list [Pet]
292
+ Returns: Array [Pet]
144
293
"""
145
294
146
295
allParams = ['status' ]
@@ -152,7 +301,7 @@ def findPetsByStatus(self, status= None, **kwargs):
152
301
params [key ] = val
153
302
del params ['kwargs' ]
154
303
155
- resourcePath = '/pet.{format} /findByStatus'
304
+ resourcePath = '/pet/findByStatus'
156
305
resourcePath = resourcePath .replace ('{format}' , 'json' )
157
306
method = 'GET'
158
307
@@ -169,7 +318,7 @@ def findPetsByStatus(self, status= None, **kwargs):
169
318
if not response :
170
319
return None
171
320
172
- responseObject = self .apiClient .deserialize (response , 'list [Pet]' )
321
+ responseObject = self .apiClient .deserialize (response , 'Array [Pet]' )
173
322
return responseObject
174
323
175
324
@@ -179,7 +328,7 @@ def findPetsByTags(self, tags, **kwargs):
179
328
Args:
180
329
tags, str: Tags to filter by (required)
181
330
182
- Returns: list [Pet]
331
+ Returns: Array [Pet]
183
332
"""
184
333
185
334
allParams = ['tags' ]
@@ -191,7 +340,7 @@ def findPetsByTags(self, tags, **kwargs):
191
340
params [key ] = val
192
341
del params ['kwargs' ]
193
342
194
- resourcePath = '/pet.{format} /findByTags'
343
+ resourcePath = '/pet/findByTags'
195
344
resourcePath = resourcePath .replace ('{format}' , 'json' )
196
345
method = 'GET'
197
346
@@ -208,7 +357,7 @@ def findPetsByTags(self, tags, **kwargs):
208
357
if not response :
209
358
return None
210
359
211
- responseObject = self .apiClient .deserialize (response , 'list [Pet]' )
360
+ responseObject = self .apiClient .deserialize (response , 'Array [Pet]' )
212
361
return responseObject
213
362
214
363
0 commit comments