Skip to content

Update schemars requirement from 0.8 to 0.9 #266

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: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 2, 2025

Updates the requirements on schemars to permit the latest version.

Release notes

Sourced from schemars's releases.

v0.9.0

This version is identical to 1.0.0-alpha.18, but is available for those who are unable to unwilling to use a pre-release version.

Those upgrading from Schemars 0.8 may want to consult the migration guide, which also applies when migrating from 0.8 to 0.9.

Changelog

Sourced from schemars's changelog.

[0.9.0] - 2025-05-26

This version is identical to 1.0.0-alpha.18, but is available for those who are unable to unwilling to use a pre-release version.

Those upgrading from Schemars 0.8 may want to consult the migration guide, which also applies when migrating from 0.8 to 0.9.

[1.0.0-alpha.18] - 2025-05-26

Added

  • #[schemars(inline)] attribute for inling schemas when deriving JsonSchema (GREsau/schemars#380)
  • Implement JsonSchema for jiff 0.2 types, under the optional jiff02 feature flag (GREsau/schemars#364)
  • Add methods to dyn GenTransform, allowing to to be used similarly to a dyn Any:
    • fn is<T>(&self) -> bool
    • fn downcast_ref<T>(&self) -> Option<&T>
    • fn downcast_mut<T>(&mut self) -> Option<&mut T>
    • fn downcast<T>(self: Box<Self>) -> Result<Box<T>, Box<Self>>
  • Schemas for i8/i16/u8/u16 now include minimum and maximum properties (GREsau/schemars#298)
  • schemars::transform::RestrictFormats - a Transform that removes any format values that are not defined by the JSON Schema standard (or explicitly allowed by a custom list). This can be used to remove non-standard formats from schemas.
  • SchemaSettings now has an include_type_name flag. When enabled, this includes an "x-rust-type" property on generated schemas, set to the name of the schema's associated rust type.

Changed

  • Rename JsonSchema::always_inline_schema() to inline_schema(), because future attributes may allow particular fields to be uninlined
  • MSRV is now 1.74
  • GenTransform::as_any and GenTransform::as_any are deprecated and will be removed before schemars 1.0 becomes stable.
  • The generation of nullable schemas (i.e. schemas for Option<T>) has been reworked, making them more accurate. The SchemaSettings::option_nullable and SchemaSettings::option_add_null_type fields are no longer used - instead, generated schemas always include the "null" type, but this can be changed to nullable by using the new AddNullable transform.
  • Update OpenAPI 3.0 meta-schema to an active URL (GREsau/schemars#394)
  • Change SchemaSettings::meta_schema and SchemaSettings::definitions_path from String to Cow<'static, str>, making it easier to construct a SchemaSettings in a const context.
  • The SchemaGenerator::take_definitions method now takes an apply_transforms flag, which when enabled, will apply the generator's current transforms to each of the schema values in the returned map.

[0.8.22] - 2025-02-25

Fixed:

[1.0.0-alpha.17] - 2024-12-02

Changed

  • For newtype variants of internally-tagged enums, prefer referencing the inner type's schema via $ref instead of always inlining the schema (GREsau/schemars#355) (this change was included in the release notes for 1.0.0-alpha.16, but was accidentally excluded from the published crate)

[1.0.0-alpha.16] - 2024-11-25

Removed (⚠️ breaking changes ⚠️)

  • the enumset1/enumset optional dependency has been removed, as its JsonSchema impl did not actually match the default serialization format of EnumSet (GREsau/schemars#339)

Changed (⚠️ breaking changes ⚠️)

... (truncated)

Commits
  • 643a4c0 v0.9.0 (identical to v1.0.0-alpha.18)
  • f9bcfd8 v1.0.0-alpha.18
  • c805be1 Add include_type_name setting for setting x-rust-type schema property (#406)
  • b24c841 Add RestrictFormats transform (#405)
  • 04db03b Re-enable some clippy lints
  • 413e4a0 Add flag to take_definitions to optionally apply transforms (#404)
  • 9d58bdc Change String settings to Cow\<'static, str> (#403)
  • b4c7f5e Update OpenAPI 3.0 meta-schema
  • fb54a6d Deprecate as_any/as_any_mut, add downcast methods to dyn GenTransform (...
  • 6a089fa Set minimum/maximum for i8/u8/i16/u16 (#401)
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [schemars](https://github.com/GREsau/schemars) to permit the latest version.
- [Release notes](https://github.com/GREsau/schemars/releases)
- [Changelog](https://github.com/GREsau/schemars/blob/master/CHANGELOG.md)
- [Commits](GREsau/schemars@v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: schemars
  dependency-version: 0.9.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file rust Pull requests that update rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants