MCPcopy Create free account
hub / github.com/python-jsonschema/jsonschema / _RefResolver

Class _RefResolver

jsonschema/validators.py:862–1233  ·  view source on GitHub ↗

Resolve JSON References. Arguments: base_uri (str): The URI of the referring document referrer: The actual referring document store (dict): A mapping from URIs to documents to cache cache_remote (bool):

Source from the content-addressed store, hash-verified

860
861
862class _RefResolver:
863 """
864 Resolve JSON References.
865
866 Arguments:
867
868 base_uri (str):
869
870 The URI of the referring document
871
872 referrer:
873
874 The actual referring document
875
876 store (dict):
877
878 A mapping from URIs to documents to cache
879
880 cache_remote (bool):
881
882 Whether remote refs should be cached after first resolution
883
884 handlers (dict):
885
886 A mapping from URI schemes to functions that should be used
887 to retrieve them
888
889 urljoin_cache (:func:`functools.lru_cache`):
890
891 A cache that will be used for caching the results of joining
892 the resolution scope to subscopes.
893
894 remote_cache (:func:`functools.lru_cache`):
895
896 A cache that will be used for caching the results of
897 resolved remote URLs.
898
899 Attributes:
900
901 cache_remote (bool):
902
903 Whether remote refs should be cached after first resolution
904
905 .. deprecated:: v4.18.0
906
907 ``RefResolver`` has been deprecated in favor of `referencing`.
908
909 """
910
911 _DEPRECATION_MESSAGE = (
912 "jsonschema.RefResolver is deprecated as of v4.18.0, in favor of the "
913 "https://github.com/python-jsonschema/referencing library, which "
914 "provides more compliant referencing behavior as well as more "
915 "flexible APIs for customization. A future release will remove "
916 "RefResolver. Please file a feature request (on referencing) if you "
917 "are missing an API for the kind of customization you need."
918 )
919

Callers 1

runFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected