-
|
Beta Was this translation helpful? Give feedback.
Answered by
Freed-Wu
Oct 23, 2023
Replies: 1 comment
-
https://python-jsonschema.readthedocs.io/en/stable/errors/: schema = {
"items": {
"anyOf": [
{"type": "string", "maxLength": 2},
{"type": "integer", "minimum": 5}
]
}
}
instance = [{}, 3, "foo"]
v = Draft202012Validator(schema)
errors = sorted(v.iter_errors(instance), key=lambda e: e.path) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Freed-Wu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://python-jsonschema.readthedocs.io/en/stable/errors/: