Skip to content

[Rust] Release 0.20.0

Latest
Compare
Choose a tag to compare
@Stranger6667 Stranger6667 released this 18 Sep 20:56
· 6 commits to master since this release
rust-v0.20.0
81b9da3

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.