diff options
author | Julian Berman <Julian@GrayVines.com> | 2013-05-20 18:55:00 -0400 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2013-05-20 18:55:00 -0400 |
commit | 7b3eec84cd215f8eb1e331434303cda949c1d9e4 (patch) | |
tree | 1a7919f6fbd7c27eb793c3ce31d514410f723753 /docs/creating.rst | |
parent | 252fbedbd0dd0b4dbc170c0c4f06a949683c4ae3 (diff) | |
download | jsonschema-7b3eec84cd215f8eb1e331434303cda949c1d9e4.tar.gz |
Arguments.
Diffstat (limited to 'docs/creating.rst')
-rw-r--r-- | docs/creating.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/creating.rst b/docs/creating.rst index 2e131cf..1b67011 100644 --- a/docs/creating.rst +++ b/docs/creating.rst @@ -10,6 +10,19 @@ 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:: validates |