Skip to content

Commit 41e8273

Browse files
committed
Merge branch 'master' of https://github.com/maneeshsahu/swagger-codegen into maneeshsahu-master
2 parents ef1666d + 6c350a7 commit 41e8273

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/swagger-codegen/src/main/resources/python/api_client.mustache

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class ApiClient(object):
183183
Builds a JSON POST object.
184184

185185
If obj is None, return None.
186-
If obj is str, int, float, bool, return directly.
186+
If obj is str, int, long, float, bool, return directly.
187187
If obj is datetime.datetime, datetime.date
188188
convert to string in iso8601 format.
189189
If obj is list, sanitize each element in the list.
@@ -193,7 +193,7 @@ class ApiClient(object):
193193
:param obj: The data to serialize.
194194
:return: The serialized form of data.
195195
"""
196-
types = (str, int, float, bool, tuple)
196+
types = (str, int, long, float, bool, tuple)
197197
if sys.version_info < (3, 0):
198198
types = types + (unicode,)
199199
if isinstance(obj, type(None)):
@@ -269,14 +269,14 @@ class ApiClient(object):
269269

270270
# convert str to class
271271
# for native types
272-
if klass in ['int', 'float', 'str', 'bool',
272+
if klass in ['int', 'long', 'float', 'str', 'bool',
273273
"date", 'datetime', "object"]:
274274
klass = eval(klass)
275275
# for model types
276276
else:
277277
klass = eval('models.' + klass)
278278

279-
if klass in [int, float, str, bool]:
279+
if klass in [int, long, float, str, bool]:
280280
return self.__deserialize_primitive(data, klass)
281281
elif klass == object:
282282
return self.__deserialize_object(data)
@@ -505,7 +505,7 @@ class ApiClient(object):
505505
:param data: str.
506506
:param klass: class literal.
507507

508-
:return: int, float, str, bool.
508+
:return: int, long, float, str, bool.
509509
"""
510510
try:
511511
value = klass(data)

0 commit comments

Comments
 (0)