Skip to content
Open
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
6 changes: 5 additions & 1 deletion sphinxcontrib/openapi/schema_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ def example_from_schema(schema):
# Combine schema examples
example = {}
for sub_schema in schema["allOf"]:
example.update(example_from_schema(sub_schema))
sub_example = example_from_schema(sub_schema)
if isinstance(sub_example, dict):
example.update(sub_example)
else:
return sub_example
return example

elif "enum" in schema:
Expand Down