Skip to content

Commit 004c0cd

Browse files
jjedeleJeffrey Jedele
andauthored
Fix #31 (#32)
Co-authored-by: Jeffrey Jedele <jeff@laralab.de>
1 parent e4e7a04 commit 004c0cd

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

openapidocs/mk/v3/examples.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,11 @@ def get_example(self, schema) -> Any:
118118
nullable: true
119119
"""
120120
items = schema["items"]
121-
return [get_example_from_schema(items) for _ in range(1)]
121+
122+
if not isinstance(items, list):
123+
items = [items]
124+
125+
return [get_example_from_schema(item) for item in items]
122126

123127

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

0 commit comments

Comments
 (0)