Skip to content

Commit 3435afe

Browse files
committed
fix: clippy warnings with 'jsonschema::JSONSchema'
Which has been replaced by 'jsonschema::Validator'.
1 parent e2a8f79 commit 3435afe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mithril-common/src/test_utils/apispec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Tools to helps validate conformity to an OpenAPI specification
22
33
use glob::glob;
4-
use jsonschema::JSONSchema;
4+
use jsonschema::Validator;
55
use reqwest::Url;
66
use serde::Serialize;
77
use serde_json::{json, Value, Value::Null};
@@ -218,7 +218,7 @@ impl<'a> APISpec<'a> {
218218
let components = self.openapi["components"].clone();
219219
schema.insert(String::from("components"), components);
220220

221-
let validator = JSONSchema::compile(&json!(schema)).unwrap();
221+
let validator = Validator::new(&json!(schema)).unwrap();
222222
match validator.validate(value).map_err(|errs| {
223223
errs.into_iter()
224224
.map(|e| e.to_string())

0 commit comments

Comments
 (0)