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" 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 {