schema_salad.ref_resolver ========================= .. py:module:: schema_salad.ref_resolver Classes ------- .. autoapisummary:: schema_salad.ref_resolver.NormDict schema_salad.ref_resolver.Loader Functions --------- .. autoapisummary:: schema_salad.ref_resolver.file_uri schema_salad.ref_resolver.uri_file_path schema_salad.ref_resolver.to_validation_exception schema_salad.ref_resolver.SubLoader Module Contents --------------- .. py:function:: file_uri(path, split_frag = False) .. py:function:: uri_file_path(url) .. py:function:: to_validation_exception(e) Convert ruamel.yaml exception to our type. .. py:class:: NormDict(normalize = str) Bases: :py:obj:`dict`\ [\ :py:obj:`str`\ , :py:obj:`ruamel.yaml.comments.CommentedMap | ruamel.yaml.comments.CommentedSeq | str | None`\ ] .. autoapi-inheritance-diagram:: schema_salad.ref_resolver.NormDict :parts: 1 A Dict where all keys are normalized using the provided function. .. py:attribute:: normalize :type: Final .. py:method:: __eq__(other) Return self==value. .. py:method:: __getitem__(key) x.__getitem__(y) <==> x[y] .. py:method:: __setitem__(key, value) Set self[key] to value. .. py:method:: __delitem__(key) Delete self[key]. .. py:method:: __contains__(key) True if the dictionary has the specified key, else False. .. py:method:: __del__() .. py:function:: SubLoader(loader) .. py:class:: Loader(ctx, schemagraph = None, foreign_properties = None, idx = None, cache = None, session = None, fetcher_constructor = None, skip_schemas = None, url_fields = None, allow_attachments = None, doc_cache = True, salad_version = None) .. py:attribute:: idx :type: schema_salad.utils.IdxType .. py:attribute:: ctx :type: Final[schema_salad.utils.ContextType] .. py:attribute:: graph .. py:attribute:: foreign_properties :type: Final .. py:attribute:: cache :type: Final .. py:attribute:: skip_schemas :type: Final .. py:attribute:: session .. py:attribute:: fetcher_constructor :type: Final .. py:attribute:: fetcher :type: Final .. py:attribute:: fetch_text :type: Final .. py:attribute:: check_exists :type: Final .. py:attribute:: url_fields :type: Final[set[str]] .. py:attribute:: scoped_ref_fields :type: Final[dict[str, int]] .. py:attribute:: vocab_fields :type: Final[set[str]] .. py:attribute:: identifiers :type: Final[list[str]] :value: [] .. py:attribute:: identity_links :type: Final[set[str]] .. py:attribute:: standalone :type: set[str] | None :value: None .. py:attribute:: nolinkcheck :type: Final[set[str]] .. py:attribute:: vocab :type: Final[dict[str, str]] .. py:attribute:: rvocab :type: Final[dict[str, str]] .. py:attribute:: idmap :type: Final[dict[str, str]] .. py:attribute:: mapPredicate :type: Final[dict[str, str]] .. py:attribute:: type_dsl_fields :type: Final[set[str]] .. py:attribute:: subscopes :type: Final[dict[str, str]] .. py:attribute:: secondaryFile_dsl_fields :type: Final[set[str]] .. py:attribute:: allow_attachments :type: Final :value: None .. py:attribute:: salad_version :type: Final .. py:method:: expand_url(url, base_url, scoped_id = False, vocab_term = False, scoped_ref = None) .. py:method:: add_namespaces(ns) Add the given namespace to our vocab list. .. py:method:: add_schemas(ns, base_url) Fetch external schemas and add them to the graph. .. py:method:: add_context(newcontext) .. py:method:: resolve_ref(ref, base_url = None, checklinks = True, strict_foreign_properties = False, content_types = None) .. py:method:: resolve_all(document, base_url, file_base = None, checklinks = True, strict_foreign_properties = False) .. py:method:: fetch(url, inject_ids = True, content_types = None) .. py:method:: validate_scoped(field, link, docid) .. py:method:: validate_link(field, link, docid, all_doc_ids) .. py:method:: getid(d) Use our identifiers to extract the first match from the document. .. py:method:: validate_links(document, base_url, all_doc_ids, strict_foreign_properties = False)