summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2013-05-20 20:55:23 -0400
committerJulian Berman <Julian@GrayVines.com>2013-05-20 20:55:23 -0400
commitf39352ddbfdd617d413d754be96df41ae1f29363 (patch)
tree25fbab5f986a700c08f16992e53cb400f9c63933
parent029b12d0646fa2cf77dc682c6000b3fdf929d913 (diff)
downloadjsonschema-f39352ddbfdd617d413d754be96df41ae1f29363.tar.gz
No idea why it complains about one indentation and not the other here.
-rw-r--r--docs/creating.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/creating.rst b/docs/creating.rst
index 6467756..9f3081d 100644
--- a/docs/creating.rst
+++ b/docs/creating.rst
@@ -11,31 +11,40 @@ Creating or Extending Validators
Create a new validator.
:argument dict meta_schema: the meta schema for the new validator
+
:argument dict validators: a mapping from validator names to functions that
validate the given name. Each function should take 4 arguments: a
validator instance, the value of the current validator property in the
instance being validated, the instance, and the schema.
+
:argument str version: an identifier for the version that this validator
will validate. If provided, the returned validator class will have its
``__name__`` set to include the version, and also will have
:func:`validates` automatically called for the given version.
+
:argument dict default_types: a default mapping to use for instances of the
validator when mapping between JSON types to Python types. The default
for this argument is probably fine. Instances of the returned validator
can still have their types customized on a per-instance basis.
+
:returns: an :class:`jsonschema.IValidator`
+
.. autofunction:: extend
Create a new validator that extends an existing validator.
:argument :class:`jsonschema.IValidator` validator: an existing validator
+
:argument dict validators: a set of new validators to add to the new
validator. Any validators with the same name as an existing one will
(silently) replace the old validator entirely.
+
:argument str version: a version for the new validator
+
:returns: an :class:`jsonschema.IValidator`
+
.. autofunction:: validates