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
It seems the applicable_validators property from c6b0fc4 never made it to extend.
This means that extending Draft4Validator (or other legacy validators) makes it consider properties next to $ref again. (This made connexion break OpenAPI 3.0 spec - spec-first/connexion#1721)
Steps to reproduce
importjsonschemaschema= {
"$defs": { "test": { "type": "number" } },
"$ref": "#/$defs/test",
"maximum": 1
}
# no error, maximum is ignored as per specjsonschema.validate(schema=schema, instance=2, cls=jsonschema.Draft4Validator)
# extend() with no changesBadValidator=jsonschema.validators.extend(jsonschema.Draft4Validator)
# jsonschema.exceptions.ValidationError: 2 is greater than the maximum of 1jsonschema.validate(schema=schema, instance=2, cls=BadValidator)
Environment
$ python --version
Python 3.11.2
$ pip show jsonschema | grep Version
Version: 4.18.2
The text was updated successfully, but these errors were encountered:
It seems the
applicable_validators
property from c6b0fc4 never made it toextend
.This means that
extend
ingDraft4Validator
(or other legacy validators) makes it consider properties next to$ref
again. (This madeconnexion
break OpenAPI 3.0 spec - spec-first/connexion#1721)Steps to reproduce
Environment
The text was updated successfully, but these errors were encountered: