Skip to content

Commit

Permalink
jsonschema: Output row for an array even if items property is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjwebb committed Oct 13, 2023
1 parent c166a00 commit 2a1017e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sphinxcontrib/jsonschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ def validations(self):

def __iter__(self):
if self.items is None:
return
# array object itself
array = Array(self.name, self.attributes, required=self.required, parent=self.parent)
yield array
elif isinstance(self.items, dict):
item = JSONSchema.instantiate(self.name + '/0', self.items, parent=self)

Expand Down

0 comments on commit 2a1017e

Please sign in to comment.