We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2a8f79 commit 3435afeCopy full SHA for 3435afe
mithril-common/src/test_utils/apispec.rs
@@ -1,7 +1,7 @@
1
//! Tools to helps validate conformity to an OpenAPI specification
2
3
use glob::glob;
4
-use jsonschema::JSONSchema;
+use jsonschema::Validator;
5
use reqwest::Url;
6
use serde::Serialize;
7
use serde_json::{json, Value, Value::Null};
@@ -218,7 +218,7 @@ impl<'a> APISpec<'a> {
218
let components = self.openapi["components"].clone();
219
schema.insert(String::from("components"), components);
220
221
- let validator = JSONSchema::compile(&json!(schema)).unwrap();
+ let validator = Validator::new(&json!(schema)).unwrap();
222
match validator.validate(value).map_err(|errs| {
223
errs.into_iter()
224
.map(|e| e.to_string())
0 commit comments