Skip to content

Commit

Permalink
Fix #31 (#32)
Browse files Browse the repository at this point in the history
Co-authored-by: Jeffrey Jedele <[email protected]>
  • Loading branch information
jjedele and Jeffrey Jedele authored Jul 12, 2023
1 parent e4e7a04 commit 004c0cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion openapidocs/mk/v3/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ def get_example(self, schema) -> Any:
nullable: true
"""
items = schema["items"]
return [get_example_from_schema(items) for _ in range(1)]

if not isinstance(items, list):
items = [items]

return [get_example_from_schema(item) for item in items]


def get_subclasses(cls) -> Iterable[Type]:
Expand Down

0 comments on commit 004c0cd

Please sign in to comment.