Skip to content

Releases: Stranger6667/jsonschema

[Rust] Release 0.21.0

29 Sep 14:37
rust-v0.21.0
c4d5505
Compare
Choose a tag to compare

Important: This release brings a complete rework of reference resolving which deprecates some older APIs.
While backward compatibility is maintained for now, users are encouraged to update their code. See the Migration Guide for details on transitioning to the new API.

Added

  • $anchor support.
  • $recursiveRef & $recursiveAnchor support in Draft 2019-09.
  • $dynamicRef & $dynamicAnchor support in Draft 2020-12.

Changed

  • BREAKING: Treat $ref as URI, not URL and additionally normalize them. #454
  • BREAKING: Resolve all non-recursive references eagerly.
  • BREAKING: Disallow use of fragments in $id. #264

Deprecated

  • SchemaResolver trait and SchemaResolverError in favor of a simpler Retrieve that works with Box<dyn std::error::Error>.
    In turn, it also deprecates ValidationOptions::with_resolver in favor of ValidationOptions::with_retriever
  • ValidationOptions::with_document in favor of ValidationOptions::with_resource.

Fixed

  • Infinite recursion in unevaluatedProperties. #420
  • Cross-draft validation from newer to older ones.
  • Changing base URI in folder.
  • Location-independent identifier in remote resource.
  • Missing some format validation for Draft 2020-12.
  • Incomplete iri & iri-reference validation.

Performance

  • Faster validation for uri, iri, uri-reference, and iri-reference formats.

[Rust] Release 0.20.0

18 Sep 20:56
rust-v0.20.0
81b9da3
Compare
Choose a tag to compare

Important: This release includes several deprecations and renames. While backward compatibility is maintained for now, users are encouraged to update their code. See the Migration Guide for details on transitioning to the new API.

Added

  • New draft-specific modules for easier version-targeted validation:
    • jsonschema::draft4
    • jsonschema::draft6
    • jsonschema::draft7
    • jsonschema::draft201909
    • jsonschema::draft202012
      Each module provides new(), is_valid(), and options() functions.
  • jsonschema::options() function as a shortcut for jsonschema::Validator::options(), that allows for customization of the validation process.

Changed

  • Make Debug implementation for SchemaNode opaque.
  • Make jsonschema::validator_for and related functions return ValidationError<'static> in their Err variant.
    This change makes possible to use the ? operator to return errors from functions where the input schema is defined.

Deprecated

  • Rename CompilationOptions to ValidationOptions for clarity.
  • Rename JSONSchema to Validator for clarity. #424
  • Rename JSONPointer to JsonPointer for consistency with naming conventions. #424
  • Rename jsonschema::compile to jsonschema::validator_for.
  • Rename CompilationOptions::compile to ValidationOptions::build.

Old names are retained for backward compatibility but will be removed in a future release.

Fixed

  • Location-independent references in remote schemas on drafts 4, 6, and 7.

[Python] Release 0.20.0

18 Sep 21:07
python-v0.20.0
3c84921
Compare
Choose a tag to compare

Added

  • New draft-specific validator classes: Draft4Validator, Draft6Validator, Draft7Validator, Draft201909Validator, and Draft202012Validator.
  • validator_for function for automatic draft detection.

Changed

  • The JSONSchema class has been renamed to Validator. The old name is retained for backward compatibility but will be removed in a future release.

Deprecated

  • The JSONSchema class is deprecated. Use the validator_for function or draft-specific validators instead.
    You can use validator_for instead of JSONSchema.from_str.
  • Constants jsonschema_rs.DRAFT4, jsonschema_rs.DRAFT6, jsonschema_rs.DRAFT7, jsonschema_rs.DRAFT201909, and jsonschema_rs.DRAFT202012 are deprecated in favor of draft-specific validator classes.

Fixed

  • Location-independent references in remote schemas on drafts 4, 6, and 7.

[Rust] Release 0.19.1

15 Sep 10:03
rust-v0.19.1
57ad568
Compare
Choose a tag to compare

Fixed

  • ipv4 format validation. #512

[Python] Release 0.19.1

15 Sep 10:05
python-v0.19.1
299b504
Compare
Choose a tag to compare

Fixed

  • ipv4 format validation. #512

[Rust] Release 0.19.0

14 Sep 16:39
rust-v0.19.0
4349227
Compare
Choose a tag to compare

Added

  • jsonschema::compile shortcut.

Changed

  • Bump MSRV to 1.70.

Fixed

  • uuid format validation.
  • Combination of unevaluatedProperties with allOf and oneOf. #496

Deprecated

  • cli feature in favor of a separate jsonschema-cli crate.
  • draft201909 and draft202012 features. The relevant functionality is now enabled by default.

Performance

  • uuid validation via uuid-simd.

[Python] Release 0.19.0

14 Sep 16:48
python-v0.19.0
426df9c
Compare
Choose a tag to compare

Fixed

  • uuid format validation.
  • Combination of unevaluatedProperties with allOf and oneOf. #496

Performance

  • uuid validation.

Removed

  • Support for Python 3.7.

[Rust] Release 0.18.3

12 Sep 07:12
rust-v0.18.3
11ebbaa
Compare
Choose a tag to compare

Fixed

  • Changing base URI when $ref is present in drafts 7 and earlier.
  • Removed dbg! macro.

[Python] Release 0.18.3

12 Sep 12:04
python-v0.18.3
e9d1f60
Compare
Choose a tag to compare

Fixed

  • Changing base URI when $ref is present in drafts 7 and earlier.

[Rust] Release 0.18.2

11 Sep 06:16
rust-v0.18.2
bacf5fb
Compare
Choose a tag to compare

Fixed

  • Ignoring $schema in resolved references.
  • Support integer-valued numbers for maxItems, maxLength, maxProperties, maxContains, minItems, minLength, minProperties, minContains.

Deprecated

  • with_meta_schemas() method. Meta schemas are included by default.