Skip to content

update: bump schemars from 0.8.22 to 0.9.0 #1137

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 May 28, 2025

Bumps schemars from 0.8.22 to 0.9.0.

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.
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 compatibility score

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)

Bumps [schemars](https://github.com/GREsau/schemars) from 0.8.22 to 0.9.0.
- [Release notes](https://github.com/GREsau/schemars/releases)
- [Changelog](https://github.com/GREsau/schemars/blob/master/CHANGELOG.md)
- [Commits](GREsau/schemars@v0.8.22...v0.9.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels May 28, 2025
Copy link

codecov bot commented May 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.64%. Comparing base (2c88f2d) to head (5aa546f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1137      +/-   ##
==========================================
+ Coverage   80.65%   81.64%   +0.98%     
==========================================
  Files         143      133      -10     
  Lines       38374    36856    -1518     
==========================================
- Hits        30951    30091     -860     
+ Misses       7423     6765     -658     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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