From ef120bc3fcfb5feae60cb2e41fe73973fad1da43 Mon Sep 17 00:00:00 2001 From: Graham Esau Date: Wed, 30 Oct 2019 19:58:45 +0000 Subject: [PATCH] v0.5.0 --- CHANGELOG.md | 11 +++++++++++ schemars/Cargo.toml | 4 ++-- schemars_derive/Cargo.toml | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..66120fe6 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,11 @@ +# Changelog + +## [0.5.0] - 2019-10-30 +### Added: +- Implemented `JsonSchema` for more standard library types (https://github.com/GREsau/schemars/issues/3) +### Changed: +- Unsigned integer types (usize, u8 etc.) now have their [`minimum`](https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.2.4) explicitly set to zero +- Made prepositions/conjunctions in generated schema names lowercase + - e.g. schema name for `Result>` has changed from "Result_Of_MyStruct_Or_Array_Of_String" to "Result_of_MyStruct_or_Array_of_String" +- Some provided `JsonSchema` implementations with the same `type` but different `format`s (e.g. `i8` and `usize`) used the `type` as their name. They have now been updated to use `format` as their name. + - Previously, schema generation would incorrectly assume types such as `MyStruct` and `MyStruct` were identical, and give them a single schema definition called `MyStruct_for_Integer` despite the fact they should have different schemas. Now they will each have their own schema (`MyStruct_for_i8` and `MyStruct_for_usize` respectively). \ No newline at end of file diff --git a/schemars/Cargo.toml b/schemars/Cargo.toml index a594fc30..95db18bc 100644 --- a/schemars/Cargo.toml +++ b/schemars/Cargo.toml @@ -2,7 +2,7 @@ name = "schemars" description = "Generate JSON Schemas from Rust code" repository = "https://github.com/GREsau/schemars" -version = "0.4.1" +version = "0.5.0" authors = ["Graham Esau "] edition = "2018" license = "MIT" @@ -12,7 +12,7 @@ categories = ["encoding"] build = "build.rs" [dependencies] -schemars_derive = { version = "0.4.0", path = "../schemars_derive" } +schemars_derive = { version = "0.5.0", path = "../schemars_derive" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" chrono = { version = "0.4", default-features = false, optional = true } diff --git a/schemars_derive/Cargo.toml b/schemars_derive/Cargo.toml index c8e47218..14e76ad0 100644 --- a/schemars_derive/Cargo.toml +++ b/schemars_derive/Cargo.toml @@ -2,7 +2,7 @@ name = "schemars_derive" description = "Macros for #[derive(JsonSchema)], for use with schemars" repository = "https://github.com/GREsau/schemars" -version = "0.4.0" +version = "0.5.0" authors = ["Graham Esau "] edition = "2018" license = "MIT"