From 252fbedbd0dd0b4dbc170c0c4f06a949683c4ae3 Mon Sep 17 00:00:00 2001 From: Julian Berman Date: Mon, 20 May 2013 18:45:57 -0400 Subject: [PATCH] Start some creating docs. --- docs/creating.rst | 8 ++++++-- docs/validate.rst | 8 ++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/creating.rst b/docs/creating.rst index fc498a1..2e131cf 100644 --- a/docs/creating.rst +++ b/docs/creating.rst @@ -4,9 +4,13 @@ Creating or Extending Validators ================================ -.. currentmodule:: jsonschema +.. currentmodule:: jsonschema.validators -.. autoclass:: ValidatorMixin +.. autofunction:: create + + Create a new validator. + + :returns: an :class:`jsonschema.IValidator` .. autofunction:: validates diff --git a/docs/validate.rst b/docs/validate.rst index 5c03946..e61ef2f 100644 --- a/docs/validate.rst +++ b/docs/validate.rst @@ -93,6 +93,14 @@ adhere to. An object representing the validator's meta schema (the schema that describes valid schemas in the given version). + .. attribute:: VALIDATORS + + A mapping of validators (:class:`str`\s) to functions that validate the + validator property with that name. Each function should take 4 + arguments: the validator instance, the value of the current validator + property in the instance, the instance, and the schema. For more + information see :ref:`creating-validators`. + .. attribute:: schema The schema that was passed in when initializing the validator.