From 0418697f8bdcd265992de4a74541c8aa64c5e87b Mon Sep 17 00:00:00 2001 From: Graham Esau Date: Sat, 14 Sep 2024 19:41:21 +0100 Subject: [PATCH] Update jsonschema --- Cargo.lock | 29 ++++++++++++++++++++--- schemars/Cargo.toml | 2 +- schemars/tests/integration/test_helper.rs | 8 ++----- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c4d9de6e..0f076208 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -416,9 +416,9 @@ dependencies = [ [[package]] name = "jsonschema" -version = "0.18.2" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa6bbf317803d2832b013425c11c67c38accba75a13653b0e64a8d31f5592f4a" +checksum = "2be7aa9f08a262039c0b5eb11b792e4353dad5263f78e33312b7ba9e43b32ae9" dependencies = [ "ahash", "anyhow", @@ -439,7 +439,7 @@ dependencies = [ "serde_json", "time", "url", - "uuid", + "uuid-simd", ] [[package]] @@ -595,6 +595,12 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "outref" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a" + [[package]] name = "parking_lot" version = "0.12.3" @@ -1115,6 +1121,17 @@ dependencies = [ "serde", ] +[[package]] +name = "uuid-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b082222b4f6619906941c17eb2297fff4c2fb96cb60164170522942a200bd8" +dependencies = [ + "outref", + "uuid", + "vsimd", +] + [[package]] name = "validator" version = "0.18.1" @@ -1151,6 +1168,12 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "vsimd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" diff --git a/schemars/Cargo.toml b/schemars/Cargo.toml index e5c59a27..384f3eae 100644 --- a/schemars/Cargo.toml +++ b/schemars/Cargo.toml @@ -37,7 +37,7 @@ uuid1 = { version = "1.0", default-features = false, optional = true, package = pretty_assertions = "1.2.1" trybuild = "1.0" serde = { version = "1.0", features = ["derive"] } -jsonschema = { version = "0.18.2", default-features = false, features = ["draft201909", "draft202012"] } +jsonschema = { version = "0.19.0", default-features = false } snapbox = { version = "0.6.17", features = ["json"] } serde_repr = "0.1.19" # Use github source until published garde version supports `length(equal = ...)` attr diff --git a/schemars/tests/integration/test_helper.rs b/schemars/tests/integration/test_helper.rs index 92272c43..219a9744 100644 --- a/schemars/tests/integration/test_helper.rs +++ b/schemars/tests/integration/test_helper.rs @@ -128,17 +128,13 @@ impl TestHelper { fn de_schema_validate(&self, instance: &Value) -> bool { self.de_schema_compiled .get_or_init(|| compile_schema(&self.de_schema)) - // Can't use `.is_valid(instance)` due to https://github.com/Stranger6667/jsonschema-rs/issues/496 - .validate(instance) - .is_ok() + .is_valid(instance) } fn ser_schema_validate(&self, instance: &Value) -> bool { self.ser_schema_compiled .get_or_init(|| compile_schema(&self.ser_schema)) - // Can't use `.is_valid(instance)` due to https://github.com/Stranger6667/jsonschema-rs/issues/496 - .validate(instance) - .is_ok() + .is_valid(instance) } }