Skip to content

Commit

Permalink
allow json schema of {}, resulting in unconstrained json value
Browse files Browse the repository at this point in the history
  • Loading branch information
lapp0 committed May 29, 2024
1 parent 538f77a commit a5f4b3f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/fsm/test_json_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,20 @@ def test_format(schema, regex, examples):
('{"a": "a"}', False), # not an array
],
),
# No schema / unconstrained value
(
{},
[
('"aaabbuecuh"', True), # string
("5.554", True), # number
("true", True), # boolean
("null", True), # null
("5999", True), # integer
# ('["a", "b"]', True), # array # issue #913
('{"key": {"k2": "value"}}', True), # nested object
("this isnt valid json", False),
],
),
],
)
def test_format_without_regex(schema, examples):
Expand Down

0 comments on commit a5f4b3f

Please sign in to comment.