Skip to content

fix(deps): update rust crate jsonschema to 0.30 #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented May 25, 2025

This PR contains the following updates:

Package Type Update Change
jsonschema dependencies minor 0.17 -> 0.30

Release Notes

Stranger6667/jsonschema (jsonschema)

v0.30.0

Added
  • JsonType and JsonTypeSet.
  • ValidationOptions::with_base_uri that allows for specifying a base URI for all relative references in the schema.
  • Configuration options for the underlying regex engine used by pattern and patternProperties keywords.
Changed
  • Better error messages for relative $ref without base URI.
Fixed
  • CLI: Inability to load relative file $ref. #​725
Removed
  • Internal cache for regular expressions.
Deprecated
  • PrimitiveType and PrimitiveTypesBitMap.

v0.29.1

Added
  • Hash, PartialOrd, Ord and serde::Serialize for Location.
  • Make Location::join public.

v0.29.0

Breaking Changes
  • All builder methods on ValidationOptions now take ownership of self instead of &mut self.
    This change enables better support for non-blocking retrieval of external resources during the process of building a validator.
    Update your code to chain the builder methods instead of reusing the options instance:

    // Before (0.28.x)
    let mut options = jsonschema::options();
    options.with_draft(Draft::Draft202012);
    options.with_format("custom", my_format);
    let validator = options.build(&schema)?;
    
    // After (0.29.0)
    let validator = jsonschema::options()
        .with_draft(Draft::Draft202012)
        .with_format("custom", my_format)
        .build(&schema)?;
  • The Retrieve trait's retrieve method now accepts URI references as &Uri<String> instead of &Uri<&str>.
    This aligns with the async version and simplifies internal URI handling. The behavior and available methods remain the same, this is purely a type-level change.

    // Before
    fn retrieve(&self, uri: &Uri<&str>) -> Result<Value, Box<dyn std::error::Error + Send + Sync>>
    
    // After
    fn retrieve(&self, uri: &Uri<String>) -> Result<Value, Box<dyn std::error::Error + Send + Sync>>
  • Simplified Registry creation API:

    • Removed RegistryOptions::try_new and RegistryOptions::try_from_resources in favor of Registry::build
    • Removed Registry::try_with_resource_and_retriever - use Registry::options().retriever() instead
    • Registry creation is now consistently done through the builder pattern
    // Before (0.28.x)
    let registry = Registry::options()
        .draft(Draft::Draft7)
        .try_new(
            "http://example.com/schema",
            resource
        )?;
    
    let registry = Registry::options()
        .draft(Draft::Draft7)
        .try_from_resources([
            ("http://example.com/schema", resource)
        ].into_iter())?;
      
    let registry = Registry.try_with_resource_and_retriever(
        "http://example.com/schema",
        resource,
        retriever
    )?;
    
    // After (0.29.0)
    let registry = Registry::options()
        .draft(Draft::Draft7)
        .build([
            ("http://example.com/schema", resource)
        ])?;
    
    let registry = Registry::options()
        .draft(Draft::Draft7)
        .build([
            ("http://example.com/schema", resource)
        ])?;
    
    let registry = Registry::options()
        .retriever(retriever)
        .build(resources)?;
Added
  • Support non-blocking retrieval for external resources during schema resolution via the new resolve-async feature. #​385
  • Re-export referencing::Registry as jsonschema::Registry.
  • ValidationOptions::with_registry that allows for providing a predefined referencing::Registry. #​682
Performance
  • Significantly improved validator compilation speed by using pointer-based references to schema fragments instead of cloning them during traversal.
  • Faster anchors & sub-resources lookups during validator compilation.

v0.28.3

Fixed
  • Panic when schema registry base URI contains an unencoded fragment.
Performance
  • Fewer JSON pointer lookups.

v0.28.2

Fixed
  • Resolving external references that nested inside local references. #​671
  • Resolving relative references with fragments against base URIs that also contain fragments. #​666
Performance
  • Faster JSON pointer resolution.

v0.28.1

Fixed
  • Handle fragment references within $id-anchored subschemas. #​640

v0.28.0

Added
  • Implement IntoIterator for Location to iterate over LocationSegment.
  • Implement FromIter for Location to build a Location from an iterator of LocationSegment.
  • ValidationError::to_owned method for converting errors into owned versions.
  • Meta-schema validation support. #​442

v0.27.1

Added
  • Implement ExactSizeIterator for PrimitiveTypesBitMapIterator.

v0.27.0

Added
  • Added masked() and masked_with() methods to ValidationError to support hiding sensitive data in error messages. #​434
Changed
  • Improved error message for unknown formats.
  • Bump MSRV to 1.71.1.

v0.26.2

Documentation
  • Fix documentation for validate

v0.26.1

Fixed
  • Return "Unknown specification" error on https-prefixed $schema for Draft 4, 5, 6. #​629

v0.26.0

Important: This release contains breaking changes. See the Migration Guide for details on transitioning to the new API.

Added
  • Validator::iter_errors that iterates over all validation errors.
Changed
  • BREAKING: Remove unused ValidationErrorKind::JSONParse, ValidationErrorKind::InvalidReference, ValidationErrorKind::Schema, ValidationErrorKind::FileNotFound and ValidationErrorKind::Utf8.
  • BREAKING: Validator::validate now returns the first error instead of an iterator in the Err variant.
Performance
  • Optimize error formatting in some cases.

v0.25.1

Fixed
  • Re-export referencing::Error as ReferencingError. #​614

v0.25.0

Important: This release removes deprecated old APIs. See the Migration Guide for details on transitioning to the new API.

Changed
  • BREAKING: Default to Draft 2020-12.
Removed
  • Deprecated draft201909, draft202012, and cli features.
  • Deprecated CompilationOptions, JSONSchema, PathChunkRef, JsonPointerNode, and SchemaResolverError aliases.
  • Deprecated jsonschema::compile, Validator::compile, ValidationOptions::compile, ValidationOptions::with_resolver, ValidationOptions::with_meta_schemas, ValidationOptions::with_document functions.
  • Deprecated SchemaResolver trait.

v0.24.3

Fixed
  • Infinite recursion when using mutually recursive $ref in unevaluatedProperties.

v0.24.2

Fixed
  • Infinite recursion in some cases. #​146
  • $ref interaction with $recursiveAnchor in Draft 2019-09.
  • unevaluatedProperties with $recursiveRef & $dynamicRef.

v0.24.1

Fixed
  • Incomplete external reference resolution.

v0.24.0

Added
  • Support $ref, $recursiveRef, and $dynamicRef in unevaluatedItems. #​287
  • Support for $vocabulary. #​263
Changed
  • Ignore prefixItems under Draft 2019-09 as it was introduced in Draft 2020-12.
Fixed
  • Numbers with zero fraction incorrectly handled in uniqueItems.
Performance
  • Speedup apply.

v0.23.0

Added
  • Partial support for unevaluatedItems, excluding references.
Changed
  • Improve error messages on WASM. #​568
  • Improve error messages on URI resolving and parsing.
  • BREAKING: Replace JsonPointer in favor of Location.
Deprecated
  • PathChunkRef in favor of LocationSegment.
  • JsonPointerNode in favor of LazyLocation.
Fixed
  • Resolving file references on Windows. #​441
  • Missing annotations from by-reference applicators. #​403
  • Relative keyword locations missing by-reference applicators (such as $ref or $dynamicRef).
Performance
  • Faster building of a validator.
  • Speedup hostname & idn-hostname formats validation.
  • Speedup apply.
Removed
  • JsonPointerNode::to_vec without a replacement.

v0.22.3

Performance
  • Speedup resolving.

v0.22.2

Fixed
  • ECMAScript 262 regex support.
Performance
  • Speedup json-pointer and relative-json-pointer formats validation.

v0.22.1

Fixed
  • Removed dbg! macro.

v0.22.0

Changed
  • Extend email validation. #​471
  • BREAKING: Custom retrievers now receive &Uri<&str> instead of &UriRef<&str>
  • Bump once_cell to 1.20.
  • Bump regex to 1.11.
Fixed
  • time format validation (leap seconds and second fractions).
  • duration format validation.
  • Panic on root $id without base. #​547
  • hostname format validation (double dot).
  • idn-hostname format validation. #​101
Performance
  • Faster building of a validator.
  • Speedup hostname, date, time, date-time, and duration formats validation.
  • Cache regular expressions for pattern. #​417

v0.21.0

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.

v0.20.0

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.

v0.19.1

Fixed

v0.19.0

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.

v0.18.3

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

v0.18.2

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.

v0.18.1

Added
  • ErrorDescription::into_inner to retrieve the inner String value.

v0.18.0

Added
  • Custom keywords support. #​379
  • Expose JsonPointerNode that can be converted into JSONPointer.
    This is needed for the upcoming custom validators support.
Changed
  • Bump base64 to 0.22.
  • Bump clap to 4.5.
  • Bump fancy-regex to 0.13.
  • Bump fraction to 0.15.
  • Bump memchr to 2.7.
  • Bump once_cell to 1.19.
  • Bump percent-encoding to 2.3.
  • Bump regex to 1.10.
  • Bump url to 2.5.
  • Build CLI only if the cli feature is enabled.
  • BREAKING: Extend CompilationOptions to support more ways to define custom format checkers (for example in Python bindings).
    In turn it changes ValidationErrorKind::Format to contain a String instead of a &'static str.
Fixed
  • Incorrect schema_path when multiple errors coming from the $ref keyword #​426
Performance
  • Optimize building JSONPointer for validation errors by allocating the exact amount of memory needed.
  • Avoid cloning path segments during validation.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/jsonschema-0.x branch 7 times, most recently from bcc7873 to 99d2d2f Compare May 30, 2025 18:06
@renovate renovate bot force-pushed the renovate/jsonschema-0.x branch 8 times, most recently from 085e4d8 to f06484b Compare June 12, 2025 16:13
Copy link

changeset-bot bot commented Jun 12, 2025

⚠️ No Changeset found

Latest commit: 640d047

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@renovate renovate bot force-pushed the renovate/jsonschema-0.x branch 2 times, most recently from d8a19d7 to 0d3499d Compare June 12, 2025 17:44
@renovate renovate bot force-pushed the renovate/jsonschema-0.x branch 12 times, most recently from a3f6a9a to 2d640ab Compare June 20, 2025 00:49
@renovate renovate bot force-pushed the renovate/jsonschema-0.x branch from 2d640ab to 640d047 Compare June 20, 2025 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants