diff options
author | Chase Sterling <chase.sterling@gmail.com> | 2013-04-01 14:37:26 -0400 |
---|---|---|
committer | Chase Sterling <chase.sterling@gmail.com> | 2013-04-01 14:37:26 -0400 |
commit | 7234ec3c14ee25e25d593914fb20341766c52177 (patch) | |
tree | 289742642baaca1a20257c271f0b18aea60c13f4 | |
parent | 300f389620b8f18c06739a6257df5319f902672f (diff) | |
download | jsonschema-7234ec3c14ee25e25d593914fb20341766c52177.tar.gz |
Update the docs for ValidationError with the new attributes
-rw-r--r-- | docs/errors.rst | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/docs/errors.rst b/docs/errors.rst index 90cbf09..5d92d21 100644 --- a/docs/errors.rst +++ b/docs/errors.rst @@ -15,15 +15,38 @@ raised or returned, depending on which method or function is used. A human readable message explaining the error. - .. attribute:: validator + .. attribute:: validator_keyword The failed validator. + .. attribute:: validator_value + + The value for the failed validator in the schema. + + .. attribute:: schema + + The full (sub)schema that this error came from. + + .. attribute:: schema_path + + A deque containing the path to the failed validator within the schema. + .. attribute:: path A deque containing the path to the offending element (or an empty deque if the error happened globally). + .. attribute:: instance + + The instance that was being validated. + + .. attribute:: context + + If the error was caused by errors in subschemas, the list of errors + from the subschemas will be available on this property. The + ``schema_path`` and ``path`` of these errors will be relative to the + parent error. + In case an invalid schema itself is encountered, a :exc:`SchemaError` is raised. |