Skip to content

Commit

Permalink
Update jsonschema
Browse files Browse the repository at this point in the history
  • Loading branch information
GREsau committed Sep 14, 2024
1 parent 94d3459 commit 0418697
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 10 deletions.
29 changes: 26 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion schemars/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ uuid1 = { version = "1.0", default-features = false, optional = true, package =
pretty_assertions = "1.2.1"
trybuild = "1.0"
serde = { version = "1.0", features = ["derive"] }
jsonschema = { version = "0.18.2", default-features = false, features = ["draft201909", "draft202012"] }
jsonschema = { version = "0.19.0", default-features = false }
snapbox = { version = "0.6.17", features = ["json"] }
serde_repr = "0.1.19"
# Use github source until published garde version supports `length(equal = ...)` attr
Expand Down
8 changes: 2 additions & 6 deletions schemars/tests/integration/test_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,13 @@ impl<T: JsonSchema> TestHelper<T> {
fn de_schema_validate(&self, instance: &Value) -> bool {
self.de_schema_compiled
.get_or_init(|| compile_schema(&self.de_schema))
// Can't use `.is_valid(instance)` due to https://github.com/Stranger6667/jsonschema-rs/issues/496
.validate(instance)
.is_ok()
.is_valid(instance)
}

fn ser_schema_validate(&self, instance: &Value) -> bool {
self.ser_schema_compiled
.get_or_init(|| compile_schema(&self.ser_schema))
// Can't use `.is_valid(instance)` due to https://github.com/Stranger6667/jsonschema-rs/issues/496
.validate(instance)
.is_ok()
.is_valid(instance)
}
}

Expand Down

0 comments on commit 0418697

Please sign in to comment.