From 201eaa9173674fc75c7e48da8d0c8a605c7430e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 23:50:17 +0000 Subject: [PATCH 1/2] chore(deps-rs): update jsonschema requirement in the minor group Updates the requirements on [jsonschema](https://github.com/Stranger6667/jsonschema) to permit the latest version. Updates `jsonschema` to 0.24.3 - [Release notes](https://github.com/Stranger6667/jsonschema/releases) - [Changelog](https://github.com/Stranger6667/jsonschema/blob/master/CHANGELOG.md) - [Commits](https://github.com/Stranger6667/jsonschema/compare/rust-v0.24.0...rust-v0.24.3) --- updated-dependencies: - dependency-name: jsonschema dependency-type: direct:production dependency-group: minor ... Signed-off-by: dependabot[bot] --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 510dde7af..e046c799f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ downcast-rs = "1.2.0" enum_dispatch = "0.3.11" html-escape = "0.2.13" itertools = "0.13.0" -jsonschema = "0.24.0" +jsonschema = "0.26.0" lazy_static = "1.4.0" num-rational = "0.4.1" paste = "1.0" From 12c37463e8d0909e157950749bceb8eba866eef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= Date: Tue, 29 Oct 2024 10:11:02 +0000 Subject: [PATCH 2/2] Migrote jsonschema changes --- hugr-core/src/hugr/serialize/test.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hugr-core/src/hugr/serialize/test.rs b/hugr-core/src/hugr/serialize/test.rs index 22ae2895c..4da2197ef 100644 --- a/hugr-core/src/hugr/serialize/test.rs +++ b/hugr-core/src/hugr/serialize/test.rs @@ -54,7 +54,8 @@ impl NamedSchema { } pub fn check(&self, val: &serde_json::Value) { - if let Err(errors) = self.schema.validate(val) { + let mut errors = self.schema.iter_errors(val).peekable(); + if errors.peek().is_some() { // errors don't necessarily implement Debug eprintln!("Schema failed to validate: {}", self.name); for error in errors {