diff --git a/Cargo.toml b/Cargo.toml index 809545033..3b2275ec2 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.19.1" +jsonschema = "0.21.0" lazy_static = "1.4.0" num-rational = "0.4.1" paste = "1.0" @@ -45,7 +45,7 @@ proptest = "1.4.0" proptest-derive = "0.5.0" regex = "1.9.5" regex-syntax = "0.8.3" -rstest = "0.22.0" +rstest = "0.23.0" serde = "1.0" serde_json = "1.0.97" serde_yaml = "0.9.19" diff --git a/hugr-core/src/hugr/serialize/test.rs b/hugr-core/src/hugr/serialize/test.rs index 67ed0a057..22ae2895c 100644 --- a/hugr-core/src/hugr/serialize/test.rs +++ b/hugr-core/src/hugr/serialize/test.rs @@ -23,7 +23,7 @@ use crate::types::{ use crate::{type_row, OutgoingPort}; use itertools::Itertools; -use jsonschema::{Draft, JSONSchema}; +use jsonschema::{Draft, Validator}; use lazy_static::lazy_static; use portgraph::LinkView; use portgraph::{multiportgraph::MultiPortGraph, Hierarchy, LinkMut, PortMut, UnmanagedDenseMap}; @@ -45,11 +45,11 @@ struct SerTestingLatest { struct NamedSchema { name: &'static str, - schema: JSONSchema, + schema: Validator, } impl NamedSchema { - pub fn new(name: &'static str, schema: JSONSchema) -> Self { + pub fn new(name: &'static str, schema: Validator) -> Self { Self { name, schema } } @@ -84,9 +84,9 @@ macro_rules! include_schema { concat!("../../../../specification/schema/", $path, "_live.json") )) .unwrap(); - JSONSchema::options() + Validator::options() .with_draft(Draft::Draft7) - .compile(&schema_val) + .build(&schema_val) .expect("Schema is invalid.") }); }