Skip to content

Commit

Permalink
Add test cases for objects with no property or additionalProperty con…
Browse files Browse the repository at this point in the history
…straints
  • Loading branch information
lapp0 committed May 20, 2024
1 parent cb37d82 commit 20d0d67
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/fsm/test_json_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,19 @@ def test_format(schema, regex, examples):
('{"time":20:20:39Z}', False), # missing quotes for value
],
),
# Unconstrained Object
(
{
"title": "Foo",
"type": "object",
},
[
("{}", True),
('{"a": 1, "b": null}', True),
('{"a": {"z": {"g": 4}}, "b": null}', True),
("1234", False), # not an object
],
),
],
)
def test_format_without_regex(schema, examples):
Expand Down

0 comments on commit 20d0d67

Please sign in to comment.