diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fe5b51d..744c9d78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Documentation + +- Fix documentation for `validate` + ## [0.26.1] - 2024-10-29 ### Fixed diff --git a/crates/jsonschema/src/validator.rs b/crates/jsonschema/src/validator.rs index 4bb7a8e0..71155fe2 100644 --- a/crates/jsonschema/src/validator.rs +++ b/crates/jsonschema/src/validator.rs @@ -193,7 +193,7 @@ impl Validator { pub fn new(schema: &Value) -> Result> { Self::options().build(schema) } - /// Run validation against `instance` and return an iterator over [`ValidationError`] in the error case. + /// Validate `instance` against `schema` and return the first error if any. #[inline] pub fn validate<'i>(&self, instance: &'i Value) -> Result<(), ValidationError<'i>> { self.root.validate(instance, &LazyLocation::new())