From ae4fe295925abf8eaa67cd1f0acd06d480379661 Mon Sep 17 00:00:00 2001 From: Graham Esau Date: Mon, 2 Dec 2024 22:19:33 +0000 Subject: [PATCH] 1.0.0-alpha.17 --- CHANGELOG.md | 7 ++++++- Cargo.lock | 4 ++-- README.md | 2 +- docs/4-features.md | 2 +- schemars/Cargo.toml | 4 ++-- schemars_derive/Cargo.toml | 2 +- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5763ab62..9f6ce939 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [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 (https://github.com/GREsau/schemars/pull/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 ⚠️_) @@ -10,7 +16,6 @@ - MSRV is now 1.70 - [The `example` attribute](https://graham.cool/schemars/deriving/attributes/#example) value is now an arbitrary expression, rather than a string literal identifying a function to call. To avoid silent behaviour changes, the expression must not be a string literal where the value can be parsed as a function path - e.g. `#[schemars(example = "foo")]` is now a compile error, but `#[schemars(example = foo())]` is allowed (as is `#[schemars(example = &"foo")]` if you want the the literal string value `"foo"` to be the example). -- For newtype variants of internally-tagged enums, prefer referencing the inner type's schema via `$ref` instead of always inlining the schema (https://github.com/GREsau/schemars/pull/355) ### Fixed diff --git a/Cargo.lock b/Cargo.lock index be9daa0f..30bc80c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -771,7 +771,7 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "schemars" -version = "1.0.0-alpha.16" +version = "1.0.0-alpha.17" dependencies = [ "arrayvec", "bigdecimal", @@ -802,7 +802,7 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "1.0.0-alpha.16" +version = "1.0.0-alpha.17" dependencies = [ "pretty_assertions", "proc-macro2", diff --git a/README.md b/README.md index ba915b85..fc68efc7 100644 --- a/README.md +++ b/README.md @@ -280,5 +280,5 @@ For example, to implement `JsonSchema` on types from `chrono`, enable it as a fe ```toml [dependencies] -schemars = { version = "1.0.0-alpha.16", features = ["chrono04"] } +schemars = { version = "1.0.0-alpha.17", features = ["chrono04"] } ``` diff --git a/docs/4-features.md b/docs/4-features.md index 4e1e5e84..11411547 100644 --- a/docs/4-features.md +++ b/docs/4-features.md @@ -30,5 +30,5 @@ For example, to implement `JsonSchema` on types from `chrono`, enable it as a fe ```toml [dependencies] -schemars = { version = "1.0.0-alpha.16", features = ["chrono04"] } +schemars = { version = "1.0.0-alpha.17", features = ["chrono04"] } ``` diff --git a/schemars/Cargo.toml b/schemars/Cargo.toml index 45f9c7dd..ca7ffbbc 100644 --- a/schemars/Cargo.toml +++ b/schemars/Cargo.toml @@ -3,7 +3,7 @@ name = "schemars" description = "Generate JSON Schemas from Rust code" homepage = "https://graham.cool/schemars/" repository = "https://github.com/GREsau/schemars" -version = "1.0.0-alpha.16" +version = "1.0.0-alpha.17" authors = ["Graham Esau "] edition = "2021" license = "MIT" @@ -13,7 +13,7 @@ categories = ["encoding", "no-std"] rust-version = "1.70" [dependencies] -schemars_derive = { version = "=1.0.0-alpha.16", optional = true, path = "../schemars_derive" } +schemars_derive = { version = "=1.0.0-alpha.17", optional = true, path = "../schemars_derive" } serde = { version = "1.0", default-features = false, features = ["alloc"]} serde_json = { version = "1.0.127", default-features = false, features = ["alloc"] } dyn-clone = "1.0" diff --git a/schemars_derive/Cargo.toml b/schemars_derive/Cargo.toml index 3322d950..1264f594 100644 --- a/schemars_derive/Cargo.toml +++ b/schemars_derive/Cargo.toml @@ -3,7 +3,7 @@ name = "schemars_derive" description = "Macros for #[derive(JsonSchema)], for use with schemars" homepage = "https://graham.cool/schemars/" repository = "https://github.com/GREsau/schemars" -version = "1.0.0-alpha.16" +version = "1.0.0-alpha.17" authors = ["Graham Esau "] edition = "2021" license = "MIT"