Commit 059698e8 authored by Andrey Veltischev's avatar Andrey Veltischev
Browse files

Merge branch 'vitalii/swagger_generator_anyOf' into 'master'

Added condition to avoid of re-expanding expanded schema

See merge request !37
parents 9abe0699 32788aa8
......@@ -44,7 +44,8 @@ class SchemaTransformer:
elif 'anyOf' in model:
schema_model = {'anyOf': {
self._split_model_name(ref['$ref']): self.expand_schema_model(schema, ref)
for ref in model['anyOf']
for ref in model['anyOf'] if isinstance(ref, dict) # <- this condition is needed to avoid
# of re-expanding expanded schema
}}
else:
schema_model = deepcopy(model)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment