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
importjson, jsonschemawithopen("eggs.json", "rb") asf:
# eczema?eggschema=json.load(f)
jsonschema.validate({"eggs": 1}, eggschema) # OK# get Unevaluated properties are not allowed ('eggs' was unexpected),# but expected 3.14 is not of type 'integer',# which is the error if remove unevaluatedPropertiesjsonschema.validate({"eggs": 3.14}, eggschema)
The text was updated successfully, but these errors were encountered:
validate() picks one error to return and it's not always the best one. You could probably change that to prefer other errors. Or use iter_errors() instead.
I think that including properties that fall validation as unevaluated is strange, but that seems to be intended as multiple implementations behave that way.
Hello, I was mislead by some errors relating to the use of
unevaluatedProperties
. Here is an MRE of my issue.Is it reasonable to expect
3.14 is not of type 'integer'
instead ofUnevaluated properties are not allowed ('eggs' was unexpected)
on the last line?contents of
eggs.json
:The text was updated successfully, but these errors were encountered: