Jsonschema Versions Save

An implementation of the JSON Schema specification for Python

v4.22.0

2 weeks ago

What's Changed

  • Improve best_match (and thereby error messages from jsonschema.validate) in cases where there are multiple sibling errors from applying anyOf / allOf -- i.e. when multiple elements of a JSON array have errors, we now do prefer showing errors from earlier elements rather than simply showing an error for the full array (#1250).
  • (Micro-)optimize equality checks when comparing for JSON Schema equality by first checking for object identity, as == would.

New Contributors

Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.21.1...v4.22.0

v4.21.1

3 months ago
  • Slightly speed up the contains keyword by removing some unnecessary validator (re-)creation.

Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.21.0...v4.21.1

v4.21.0

3 months ago

What's Changed

  • Fix the behavior of enum in the presence of 0 or 1 to properly consider True and False unequal (#1208).
  • Special case the error message for {min,max}{Items,Length,Properties} when they're checking for emptiness rather than true length.

New Contributors

Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.20.0...v4.21.0

v4.20.0

5 months ago
  • Properly consider items (and properties) to be evaluated by unevaluatedItems (resp. unevaluatedProperties) when behind a $dynamicRef as specified by the 2020 and 2019 specifications.
  • jsonschema.exceptions.ErrorTree.__setitem__ is now deprecated. More broadly, in general users of jsonschema should never be mutating objects owned by the library.

Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.19.2...v4.20.0

v4.19.2

6 months ago
  • Fix the error message for additional items when used with heterogeneous arrays.
  • Don't leak the additionalItems keyword into JSON Schema draft 2020-12, where it was replaced by items.

Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.19.1...v4.19.2

v4.19.1

7 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.19.0...v4.19.1

v4.19.0

9 months ago
  • Importing the Validator protocol directly from the package root is deprecated. Import it from jsonschema.protocols.Validator instead.
  • Automatic retrieval of remote references (which is still deprecated) now properly succeeds even if the retrieved resource does not declare which version of JSON Schema it uses. Such resources are assumed to be 2020-12 schemas. This more closely matches the pre-referencing library behavior.

Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.18.6...v4.19.0

v4.18.5

9 months ago

v4.18.4

9 months ago
  • Improve the hashability of wrapped referencing exceptions when they contain hashable data.

Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.18.3...v4.18.4