summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Sterling <chase.sterling@gmail.com>2013-04-01 14:37:26 -0400
committerChase Sterling <chase.sterling@gmail.com>2013-04-01 14:37:26 -0400
commit7234ec3c14ee25e25d593914fb20341766c52177 (patch)
tree289742642baaca1a20257c271f0b18aea60c13f4
parent300f389620b8f18c06739a6257df5319f902672f (diff)
downloadjsonschema-7234ec3c14ee25e25d593914fb20341766c52177.tar.gz
Update the docs for ValidationError with the new attributes
-rw-r--r--docs/errors.rst25
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.