You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using a validator to check my schemas against JSON Schema Draft-07 schema (http://json-schema.org/draft-07/schema), and found that validation method incorrectly applies default to validated table.
Adding "items":true is invalid here and breaks source schema - it makes it accept invalid inputs (the last output line should say falsefailed to validate item 1: string too short, expected at least 1, got 0).
This error is caused by handing of default values added in 66242c3. Generated code looks like this:
-- we're validating "items" object, i.e. {"minLength":1,"type":"string"}localpropvalue=p_1["items"]
ifpropvalue~=nilthen-- nested validation is skipped because there is no nested "items" key-- ...endifpropvalue==nilthen-- and here validator breaks valdiated objectp_1["items"] =trueend
The text was updated successfully, but these errors were encountered:
I'm using a validator to check my schemas against JSON Schema Draft-07 schema (http://json-schema.org/draft-07/schema), and found that validation method incorrectly applies
default
to validated table.Reproduction:
Result:
Adding
"items":true
is invalid here and breaks source schema - it makes it accept invalid inputs (the last output line should sayfalsefailed to validate item 1: string too short, expected at least 1, got 0
).This error is caused by handing of default values added in 66242c3. Generated code looks like this:
The text was updated successfully, but these errors were encountered: