From 1174a894c83a91906a87ff25b9b1ac4d32770161 Mon Sep 17 00:00:00 2001 From: "hash-worker[bot]" <180894564+hash-worker[bot]@users.noreply.github.com> Date: Thu, 19 Sep 2024 01:38:30 +0000 Subject: [PATCH 1/2] Update Rust crate `jsonschema` to v0.20.0 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d941864a911..dbe66b5ec5d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3382,9 +3382,9 @@ dependencies = [ [[package]] name = "jsonschema" -version = "0.19.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14a655181740aa66dfcb182daca1bc8109fda5c7c0399c4f30dcb155ab0d32a6" +checksum = "f2eef4e82b548e08ac880d307c8e8838b45f497a08d3202f3b26c9debaed8058" dependencies = [ "ahash", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 3ece50b6b40..d54e466bc9c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -156,7 +156,7 @@ humansize = { version = "=2.1.3", default-features = false } hyper = { version = "=1.4.1", default-features = false } include_dir = { version = "=0.7.4", default-features = false } insta = { version = "=1.40.0", default-features = false } -jsonschema = { version = "=0.19.1", default-features = false } +jsonschema = { version = "=0.20.0", default-features = false } justjson = { version = "=0.3.0", default-features = false } lexical = { version = "=7.0.1", default-features = false } libp2p = { version = "=0.54.1", default-features = false } From c48d3f67fe34a950cb7f6287d7fe44a7e31f0c9b Mon Sep 17 00:00:00 2001 From: Tim Diekmann Date: Thu, 19 Sep 2024 11:00:59 +0200 Subject: [PATCH 2/2] Replace functions with recommended replacements --- libs/sarif/src/schema/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/sarif/src/schema/mod.rs b/libs/sarif/src/schema/mod.rs index 8cea2dd2732..c2a59c69245 100644 --- a/libs/sarif/src/schema/mod.rs +++ b/libs/sarif/src/schema/mod.rs @@ -63,8 +63,8 @@ pub(crate) mod tests { let json_schema_str = include_str!("../../tests/schemas/sarif-2.1.0.json"); let json_schema_value = serde_json::from_str(json_schema_str).expect("could not parse JSON schema"); - let json_schema = jsonschema::JSONSchema::options() - .compile(&json_schema_value) + let json_schema = jsonschema::Validator::options() + .build(&json_schema_value) .expect("could not compile JSON schema"); let validation = json_schema.validate(&log_value);