Merge branch 'issue-3647' of https://github.com/zbiro/swagger-codegen into zbiro-issue-3647

This commit is contained in:
wing328 2016-08-31 00:25:06 +08:00
commit 343ca03512
3 changed files with 7 additions and 1 deletions

View File

@ -564,6 +564,9 @@ class ApiClient(object):
""" """
instance = klass() instance = klass()
if not instance.swagger_types:
return data
for attr, attr_type in iteritems(instance.swagger_types): for attr, attr_type in iteritems(instance.swagger_types):
if data is not None \ if data is not None \
and instance.attribute_map[attr] in data\ and instance.attribute_map[attr] in data\

View File

@ -5,7 +5,7 @@ This Python package is automatically generated by the [Swagger Codegen](https://
- API version: 1.0.0 - API version: 1.0.0
- Package version: 1.0.0 - Package version: 1.0.0
- Build date: 2016-08-27T14:30:36.450+03:00 - Build date: 2016-08-29T16:39:50.642+02:00
- Build package: class io.swagger.codegen.languages.PythonClientCodegen - Build package: class io.swagger.codegen.languages.PythonClientCodegen
## Requirements. ## Requirements.

View File

@ -564,6 +564,9 @@ class ApiClient(object):
""" """
instance = klass() instance = klass()
if not instance.swagger_types:
return data
for attr, attr_type in iteritems(instance.swagger_types): for attr, attr_type in iteritems(instance.swagger_types):
if data is not None \ if data is not None \
and instance.attribute_map[attr] in data\ and instance.attribute_map[attr] in data\