add support for semver crate (#238)

---------

Co-authored-by: Omar Tawfik <15987992+OmarTawfik@users.noreply.github.com>
This commit is contained in:
Graham Esau 2023-08-27 20:00:36 +01:00 committed by GitHub
parent 1ac9d19a24
commit 0303f0334e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 65 additions and 0 deletions

View file

@ -25,6 +25,7 @@ Schemars can implement `JsonSchema` on types from several popular crates, enable
- `rust_decimal` - [rust_decimal](https://crates.io/crates/rust_decimal) (^1.0)
- `bigdecimal` - [bigdecimal](https://crates.io/crates/bigdecimal) (^0.3)
- `smol_str` - [smol_str](https://crates.io/crates/smol_str) (^0.1.17)
- `semver` - [semver](https://crates.io/crates/semver) (^1.0.9)
For example, to implement `JsonSchema` on types from `chrono`, enable it as a feature in the `schemars` dependency in your `Cargo.toml` like so: