@@ -37,7 +37,7 @@ raised or returned, depending on which method or function is used.
3737 .. attribute:: validator
3838
3939 The name of the failed `validator
40- <https://json-schema.org/draft-04 /json-schema-validation.html#rfc.section.5 > `_.
40+ <https://json-schema.org/draft/2020-12 /json-schema-validation.html#name-a-vocabulary-for-structural > `_.
4141
4242 .. attribute:: validator_value
4343
@@ -140,7 +140,7 @@ These attributes can be clarified with a short example:
140140 }
141141 }
142142 instance = [{}, 3, "foo"]
143- v = Draft7Validator (schema)
143+ v = Draft202012Validator (schema)
144144 errors = sorted(v.iter_errors(instance), key=lambda e: e.path)
145145
146146The error messages in this situation are not very helpful on their own.
@@ -254,7 +254,7 @@ For clarity's sake, the given instance has three errors under this schema:
254254
255255.. testcode::
256256
257- v = Draft3Validator (schema)
257+ v = Draft202012Validator (schema)
258258 for error in sorted(v.iter_errors(["spam", 2]), key=str):
259259 print(error.message)
260260
@@ -350,14 +350,14 @@ to guess the most relevant error in a given bunch.
350350
351351.. doctest::
352352
353- >>> from jsonschema import Draft7Validator
353+ >>> from jsonschema import Draft202012Validator
354354 >>> from jsonschema.exceptions import best_match
355355
356356 >>> schema = {
357357 ... "type": "array",
358358 ... "minItems": 3,
359359 ... }
360- >>> print(best_match(Draft7Validator (schema).iter_errors(11)).message)
360+ >>> print(best_match(Draft202012Validator (schema).iter_errors(11)).message)
361361 11 is not of type 'array'
362362
363363
@@ -395,7 +395,7 @@ to guess the most relevant error in a given bunch.
395395 ... },
396396 ... }
397397 >>> instance = {"name": 123, "phones": {"home": [123]}}
398- >>> errors = Draft7Validator (schema).iter_errors(instance)
398+ >>> errors = Draft202012Validator (schema).iter_errors(instance)
399399 >>> [
400400 ... e.path[-1]
401401 ... for e in sorted(errors, key=exceptions.relevance)
0 commit comments