diff options
Diffstat (limited to 'jsonschema')
-rw-r--r-- | jsonschema/_legacy_validators.py | 7 | ||||
-rw-r--r-- | jsonschema/validators.py | 5 |
2 files changed, 8 insertions, 4 deletions
diff --git a/jsonschema/_legacy_validators.py b/jsonschema/_legacy_validators.py index 194c68f..7cb6df9 100644 --- a/jsonschema/_legacy_validators.py +++ b/jsonschema/_legacy_validators.py @@ -4,8 +4,11 @@ from jsonschema.exceptions import ValidationError def ignore_ref_siblings(schema): """ - Returns a list of validators that should apply for the given schema - Used for draft7 and earlier + Ignore siblings of ``$ref`` if it is present. + + Otherwise, return all validators. + + Suitable for use with `create`'s ``applicable_validators`` argument. """ ref = schema.get(u"$ref") if ref is not None: diff --git a/jsonschema/validators.py b/jsonschema/validators.py index a1d4214..7a07415 100644 --- a/jsonschema/validators.py +++ b/jsonschema/validators.py @@ -128,8 +128,9 @@ def create( applicable_validators (collections.abc.Callable): - A function that returns a list of validators that should apply - to a given schema + A function that given a schema, returns the list of applicable + validators (names and callables) which will be called on to + validate the instance. Returns: |