Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix repeat getattr #69

Merged
merged 4 commits into from
Jul 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion swagger_py_codegen/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .command import generate

__version__ = '0.1.16'
__version__ = '0.1.17'
5 changes: 3 additions & 2 deletions swagger_py_codegen/jsonschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@ def _normalize_dict(schema, data):
_schema['default'] = required_defaults[type_]

# get value
if data.has(key):
result[key] = _normalize(_schema, data.get(key))
value = data.get(key)
if value is not None:
result[key] = _normalize(_schema, value)
elif 'default' in _schema:
result[key] = _schema['default']
elif key in schema.get('required', []):
Expand Down