Skip to content

Commit

Permalink
Update Rust crate jsonschema to 0.27 (#32963)
Browse files Browse the repository at this point in the history
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [jsonschema](https://redirect.github.com/Stranger6667/jsonschema) | workspace.dependencies | minor | `0.18` -> `0.27` | `0.28.3` (+3) |

---

### Release Notes

<details>
<summary>Stranger6667/jsonschema (jsonschema)</summary>

### [`v0.27.1`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0271---2024-12-24)

##### Added

-   Implement `ExactSizeIterator` for `PrimitiveTypesBitMapIterator`.

### [`v0.27.0`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0270---2024-12-23)

##### Added

-   Added `masked()` and `masked_with()` methods to `ValidationError` to support hiding sensitive data in error messages. [#&#8203;434](https://redirect.github.com/Stranger6667/jsonschema/issues/434)

##### Changed

-   Improved error message for unknown formats.
-   Bump MSRV to `1.71.1`.

### [`v0.26.2`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0262---2024-12-16)

##### Documentation

-   Fix documentation for `validate`

### [`v0.26.1`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0261---2024-10-29)

##### Fixed

-   Return "Unknown specification" error on `https`-prefixed `$schema` for Draft 4, 5, 6. [#&#8203;629](https://redirect.github.com/Stranger6667/jsonschema/issues/629)

### [`v0.26.0`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0260---2024-10-26)

**Important:** This release contains breaking changes. See the [Migration Guide](MIGRATION.md) 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`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0251---2024-10-25)

##### Fixed

-   Re-export `referencing::Error` as `ReferencingError`. [#&#8203;614](https://redirect.github.com/Stranger6667/jsonschema/issues/614)

### [`v0.25.0`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0250---2024-10-24)

**Important:** This release removes deprecated old APIs. See the [Migration Guide](MIGRATION.md) 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`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0243---2024-10-24)

##### Fixed

-   Infinite recursion when using mutually recursive `$ref` in `unevaluatedProperties`.

### [`v0.24.2`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0242---2024-10-24)

##### Fixed

-   Infinite recursion in some cases. [#&#8203;146](https://redirect.github.com/Stranger6667/jsonschema/issues/146)
-   `$ref` interaction with `$recursiveAnchor` in Draft 2019-09.
-   `unevaluatedProperties` with `$recursiveRef` & `$dynamicRef`.

### [`v0.24.1`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0241---2024-10-21)

##### Fixed

-   Incomplete external reference resolution.

### [`v0.24.0`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0240---2024-10-20)

##### Added

-   Support `$ref`, `$recursiveRef`, and `$dynamicRef` in `unevaluatedItems`. [#&#8203;287](https://redirect.github.com/Stranger6667/jsonschema/issues/287)
-   Support for `$vocabulary`. [#&#8203;263](https://redirect.github.com/Stranger6667/jsonschema/issues/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`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0230---2024-10-12)

##### Added

-   Partial support for `unevaluatedItems`, excluding references.

##### Changed

-   Improve error messages on WASM. [#&#8203;568](https://redirect.github.com/Stranger6667/jsonschema/issues/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. [#&#8203;441](https://redirect.github.com/Stranger6667/jsonschema/issues/441)
-   Missing annotations from by-reference applicators. [#&#8203;403](https://redirect.github.com/Stranger6667/jsonschema/issues/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`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0223---2024-10-05)

##### Performance

-   Speedup resolving.

### [`v0.22.2`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0222---2024-10-04)

##### Fixed

-   ECMAScript 262 regex support.

##### Performance

-   Speedup `json-pointer` and `relative-json-pointer` formats validation.

### [`v0.22.1`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0221---2024-10-03)

##### Fixed

-   Removed `dbg!` macro.

### [`v0.22.0`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0220---2024-10-03)

##### Changed

-   Extend email validation. [#&#8203;471](https://redirect.github.com/Stranger6667/jsonschema/issues/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. [#&#8203;547](https://redirect.github.com/Stranger6667/jsonschema/issues/547)
-   `hostname` format validation (double dot).
-   `idn-hostname` format validation. [#&#8203;101](https://redirect.github.com/Stranger6667/jsonschema/issues/101)

##### Performance

-   Faster building of a validator.
-   Speedup `hostname`, `date`, `time`, `date-time`, and `duration` formats validation.
-   Cache regular expressions for `pattern`. [#&#8203;417](https://redirect.github.com/Stranger6667/jsonschema/issues/417)

### [`v0.21.0`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0210---2024-09-29)

**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](MIGRATION.md) 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. [#&#8203;454](https://redirect.github.com/Stranger6667/jsonschema/issues/454)
-   **BREAKING**: Resolve all non-recursive references eagerly.
-   **BREAKING**: Disallow use of fragments in `$id`. [#&#8203;264](https://redirect.github.com/Stranger6667/jsonschema/issues/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`. [#&#8203;420](https://redirect.github.com/Stranger6667/jsonschema/issues/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`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0200---2024-09-18)

**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](MIGRATION.md) 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. [#&#8203;424](https://redirect.github.com/Stranger6667/jsonschema/issues/424)
-   Rename `JSONPointer` to `JsonPointer` for consistency with naming conventions. [#&#8203;424](https://redirect.github.com/Stranger6667/jsonschema/issues/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`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0191---2024-09-15)

##### Fixed

-   `ipv4` format validation. [#&#8203;512](https://redirect.github.com/Stranger6667/jsonschema/issues/512)

### [`v0.19.0`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0190---2024-09-14)

##### Added

-   `jsonschema::compile` shortcut.

##### Changed

-   Bump MSRV to `1.70`.

##### Fixed

-   `uuid` format validation.
-   Combination of `unevaluatedProperties` with `allOf` and `oneOf`. [#&#8203;496](https://redirect.github.com/Stranger6667/jsonschema/issues/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`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0183---2024-09-12)

##### Fixed

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

### [`v0.18.2`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0182---2024-09-11)

##### 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`](https://redirect.github.com/Stranger6667/jsonschema/blob/HEAD/CHANGELOG.md#0181---2024-08-24)

##### Added

-   `ErrorDescription::into_inner` to retrieve the inner `String` value.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on the first day of the month" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined).

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

♻ **Rebasing**: Whenever PR becomes conflicted, 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 has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate).

GitOrigin-RevId: b722eaae533adf5e8356ba06123f72a689a13564
  • Loading branch information
convex-renovate-runner[bot] authored and Convex, Inc. committed Jan 28, 2025
1 parent 153bfb4 commit be63f9f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit be63f9f

Please sign in to comment.