Skip to content

Commit 25fc533

Browse files
committed
docs: Fix docstring for validate
Signed-off-by: Dmitry Dygalo <[email protected]>
1 parent 0b836b1 commit 25fc533

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
### Documentation
6+
7+
- Fix documentation for `validate`
8+
59
## [0.26.1] - 2024-10-29
610

711
### Fixed

crates/jsonschema/src/validator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ impl Validator {
193193
pub fn new(schema: &Value) -> Result<Validator, ValidationError<'static>> {
194194
Self::options().build(schema)
195195
}
196-
/// Run validation against `instance` and return an iterator over [`ValidationError`] in the error case.
196+
/// Validate `instance` against `schema` and return the first error if any.
197197
#[inline]
198198
pub fn validate<'i>(&self, instance: &'i Value) -> Result<(), ValidationError<'i>> {
199199
self.root.validate(instance, &LazyLocation::new())

0 commit comments

Comments
 (0)