1.0.0-alpha.14
This commit is contained in:
parent
bb72f0a4f7
commit
441249a53b
7 changed files with 14 additions and 8 deletions
|
@ -1,5 +1,11 @@
|
|||
# Changelog
|
||||
|
||||
## [1.0.0-alpha.14] - 2024-08-29
|
||||
|
||||
### Added
|
||||
|
||||
- Read `#[garde(...)]` attributes as an alternative to `#[validate(...)]` (https://github.com/GREsau/schemars/issues/233 / https://github.com/GREsau/schemars/pull/331). See [the documentation](https://graham.cool/schemars/deriving/attributes/#supported-validatorgarde-attributes) for a full list of supported attributes.
|
||||
|
||||
## [1.0.0-alpha.13] - 2024-08-27
|
||||
|
||||
### Fixed
|
||||
|
|
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -309,7 +309,7 @@ checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
|
|||
|
||||
[[package]]
|
||||
name = "schemars"
|
||||
version = "1.0.0-alpha.13"
|
||||
version = "1.0.0-alpha.14"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bigdecimal",
|
||||
|
@ -335,7 +335,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "schemars_derive"
|
||||
version = "1.0.0-alpha.13"
|
||||
version = "1.0.0-alpha.14"
|
||||
dependencies = [
|
||||
"pretty_assertions",
|
||||
"proc-macro2",
|
||||
|
|
|
@ -281,5 +281,5 @@ For example, to implement `JsonSchema` on types from `chrono`, enable it as a fe
|
|||
|
||||
```toml
|
||||
[dependencies]
|
||||
schemars = { version = "1.0.0-alpha.13", features = ["chrono04"] }
|
||||
schemars = { version = "1.0.0-alpha.14", features = ["chrono04"] }
|
||||
```
|
||||
|
|
|
@ -31,5 +31,5 @@ For example, to implement `JsonSchema` on types from `chrono`, enable it as a fe
|
|||
|
||||
```toml
|
||||
[dependencies]
|
||||
schemars = { version = "1.0.0-alpha.13", features = ["chrono04"] }
|
||||
schemars = { version = "1.0.0-alpha.14", features = ["chrono04"] }
|
||||
```
|
||||
|
|
|
@ -234,7 +234,7 @@ Validator docs: [range](https://github.com/Keats/validator#range)
|
|||
|
||||
Sets the `pattern` property for string schemas. The `static_regex` will typically refer to a [`Regex`](https://docs.rs/regex/*/regex/struct.Regex.html) instance, but Schemars allows it to be any value with a `to_string()` method.
|
||||
|
||||
`regex(pattern = ...)` is a Schemars extension, and not currently supported by the Validator crate. When using this form (or the Garde-style `pattern` attribute), you may want to use a `r"raw string literal"` so that `\\` characters in the regex pattern are not interpreted as escape sequences in the string. Using the `path` form is not allowed in a `#[schemars(...)]` attribute.
|
||||
`regex(pattern = ...)` is a Schemars extension, and not currently supported by the Validator crate. When using this form (or the Garde-style `pattern` attribute), you may want to use a `r"raw string literal"` so that `\\` characters in the regex pattern are not interpreted as escape sequences in the string. Using the `path = ...` form is not allowed in a `#[schemars(...)]` attribute.
|
||||
|
||||
Validator docs: [regex](https://github.com/Keats/validator#regex)
|
||||
|
||||
|
|
|
@ -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.13"
|
||||
version = "1.0.0-alpha.14"
|
||||
authors = ["Graham Esau <gesau@hotmail.co.uk>"]
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
|
@ -13,7 +13,7 @@ categories = ["encoding", "no-std"]
|
|||
rust-version = "1.65"
|
||||
|
||||
[dependencies]
|
||||
schemars_derive = { version = "=1.0.0-alpha.13", optional = true, path = "../schemars_derive" }
|
||||
schemars_derive = { version = "=1.0.0-alpha.14", 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"
|
||||
|
|
|
@ -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.13"
|
||||
version = "1.0.0-alpha.14"
|
||||
authors = ["Graham Esau <gesau@hotmail.co.uk>"]
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue