From 238e7111ecb012c4674b55a02a3ad54d4ae25a36 Mon Sep 17 00:00:00 2001 From: Julian Berman Date: Thu, 29 Dec 2022 10:58:11 -0500 Subject: Deprecate jsonschema.RefResolver from both places it is importable. Internal uses of it will be removed, replaced with referencing's resolution APIs, though RefResolver will continue to function during its deprecation period. --- docs/api/jsonschema/validators/index.rst | 1 + docs/faq.rst | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/api/jsonschema/validators/index.rst b/docs/api/jsonschema/validators/index.rst index f5cf82c..13a9991 100644 --- a/docs/api/jsonschema/validators/index.rst +++ b/docs/api/jsonschema/validators/index.rst @@ -4,3 +4,4 @@ .. automodule:: jsonschema.validators :members: :undoc-members: + :private-members: _RefResolver diff --git a/docs/faq.rst b/docs/faq.rst index 4dc1c5b..2236390 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -85,7 +85,7 @@ The JSON object ``{}`` is simply the Python `dict` ``{}``, and a JSON Schema lik The :kw:`$ref` keyword is a single notable exception. - Specifically, in the case where `jsonschema` is asked to `resolve a remote reference `, it has no choice but to assume that the remote reference is serialized as JSON, and to deserialize it using the `json` module. + Specifically, in the case where `jsonschema` is asked to resolve a remote reference, it has no choice but to assume that the remote reference is serialized as JSON, and to deserialize it using the `json` module. One cannot today therefore reference some remote piece of YAML and have it deserialized into Python objects by this library without doing some additional work. @@ -104,12 +104,9 @@ How do I configure a base URI for $ref resolution using local files? `jsonschema` supports loading schemas from the filesystem. -The most common mistake when configuring a `jsonschema.validators.RefResolver` -to retrieve schemas from the local filesystem is to give it a base URI -which points to a directory, but forget to add a trailing slash. +The most common mistake when configuring reference resolution to retrieve schemas from the local filesystem is to specify a base URI which points to a directory, but forget to add a trailing slash. -For example, given a directory ``/tmp/foo/`` with ``bar/schema.json`` -within it, you should use something like: +For example, given a directory ``/tmp/foo/`` with ``bar/schema.json`` within it, you should use something like: .. code-block:: python -- cgit v1.2.1