mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-16 00:21:19 +00:00
Add enum support for model property of python client
This commit is contained in:
@@ -149,7 +149,7 @@ class ApiClient(object):
|
||||
# Convert model obj to dict except attributes `swagger_types`, `attribute_map`
|
||||
# and attributes which value is not None.
|
||||
# Convert attribute name to json key in model definition for request.
|
||||
obj_dict = {obj.attribute_map[key]: val
|
||||
obj_dict = {obj.attribute_map[key[1:]]: val
|
||||
for key, val in iteritems(obj.__dict__)
|
||||
if key != 'swagger_types' and key != 'attribute_map' and val is not None}
|
||||
return {key: self.sanitize_for_serialization(val)
|
||||
|
||||
Reference in New Issue
Block a user