From 4ec25f37a1585679f579d5f48dbdc01e1c77e966 Mon Sep 17 00:00:00 2001 From: Anand Krishnamoorthi <35780660+anakrish@users.noreply.github.com> Date: Wed, 6 Nov 2024 13:05:48 -0800 Subject: [PATCH] build(deps): update jsonschema requirement from 0.24.0 to 0.26.1 (#343) Signed-off-by: Anand Krishnamoorthi --- Cargo.toml | 2 +- src/builtins/objects.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fd8acd7..6bc7e4e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -120,7 +120,7 @@ semver = {version = "1.0.20", optional = true, default-features = false } wax = { version = "0.6.0", features = [], default-features = false, optional = true } url = { version = "2.5.0", optional = true } uuid = { version = "1.6.1", default-features = false, features = ["v4", "fast-rng"], optional = true } -jsonschema = { version = "0.24.0", default-features = false, optional = true } +jsonschema = { version = "0.26.1", default-features = false, optional = true } chrono = { version = "0.4.31", optional = true } chrono-tz = { version = "0.10.0", optional = true } jsonwebtoken = { version = "9.2.0", optional = true } diff --git a/src/builtins/objects.rs b/src/builtins/objects.rs index 8788df4..76d91ea 100644 --- a/src/builtins/objects.rs +++ b/src/builtins/objects.rs @@ -445,10 +445,7 @@ fn json_match_schema( match compile_json_schema(¶ms[1], &args[1]) { Ok(schema) => match schema.validate(&document) { Ok(_) => [Value::Bool(true), Value::Null], - Err(e) => [ - Value::Bool(false), - Value::from_array(e.map(|e| Value::String(e.to_string().into())).collect()), - ], + Err(e) => [Value::Bool(false), Value::from(e.to_string())], }, Err(e) if strict => bail!(params[1] .span()