Skip to content

Commit 558f0b8

Browse files
committed
fixes RecursionError
1 parent 581baa6 commit 558f0b8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

swagger_py_codegen/jsonschema.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ def _normalize_dict(schema, data):
197197

198198
# get value
199199
value, has_key = data.get_check(key)
200-
if has_key or '$ref' in _schema:
200+
if has_key and '$ref' in _schema:
201+
result[key] = _normalize(_schema, value)
202+
elif has_key:
201203
result[key] = _normalize(_schema, value)
202204
elif 'default' in _schema:
203205
result[key] = _schema['default']

0 commit comments

Comments
 (0)