summaryrefslogtreecommitdiff
path: root/docs/errors.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/errors.rst')
-rw-r--r--docs/errors.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/errors.rst b/docs/errors.rst
index 2b2f485..dbcecc0 100644
--- a/docs/errors.rst
+++ b/docs/errors.rst
@@ -140,7 +140,7 @@ These attributes can be clarified with a short example:
}
}
instance = [{}, 3, "foo"]
- v = Draft7Validator(schema)
+ v = Draft201909Validator(schema)
errors = sorted(v.iter_errors(instance), key=lambda e: e.path)
The error messages in this situation are not very helpful on their own.
@@ -350,14 +350,14 @@ to guess the most relevant error in a given bunch.
.. doctest::
- >>> from jsonschema import Draft7Validator
+ >>> from jsonschema import Draft201909Validator
>>> from jsonschema.exceptions import best_match
>>> schema = {
... "type": "array",
... "minItems": 3,
... }
- >>> print(best_match(Draft7Validator(schema).iter_errors(11)).message)
+ >>> print(best_match(Draft201909Validator(schema).iter_errors(11)).message)
11 is not of type 'array'
@@ -395,7 +395,7 @@ to guess the most relevant error in a given bunch.
... },
... }
>>> instance = {"name": 123, "phones": {"home": [123]}}
- >>> errors = Draft7Validator(schema).iter_errors(instance)
+ >>> errors = Draft201909Validator(schema).iter_errors(instance)
>>> [
... e.path[-1]
... for e in sorted(errors, key=exceptions.relevance)