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:`Union`\ [\ :py:obj:`ruamel.yaml.comments.CommentedMap`\ , :py:obj:`ruamel.yaml.comments.CommentedSeq`\ , :py:obj:`str`\ , :py:obj:`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


   .. py:method:: __eq__(other)

      Return self==value.



   .. py:method:: __getitem__(key)

      Return self[key].



   .. 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:  schema_salad.utils.ContextType


   .. py:attribute:: graph


   .. py:attribute:: foreign_properties


   .. py:attribute:: cache


   .. py:attribute:: skip_schemas


   .. py:attribute:: fetcher_constructor


   .. py:attribute:: fetcher


   .. py:attribute:: fetch_text


   .. py:attribute:: check_exists


   .. py:attribute:: url_fields
      :type:  set[str]


   .. py:attribute:: scoped_ref_fields
      :type:  dict[str, int]


   .. py:attribute:: vocab_fields
      :type:  set[str]


   .. py:attribute:: identifiers
      :type:  list[str]
      :value: []



   .. py:attribute:: identity_links
      :type:  set[str]


   .. py:attribute:: standalone
      :type:  Optional[set[str]]
      :value: None



   .. py:attribute:: nolinkcheck
      :type:  set[str]


   .. py:attribute:: vocab
      :type:  dict[str, str]


   .. py:attribute:: rvocab
      :type:  dict[str, str]


   .. py:attribute:: idmap
      :type:  dict[str, str]


   .. py:attribute:: mapPredicate
      :type:  dict[str, str]


   .. py:attribute:: type_dsl_fields
      :type:  set[str]


   .. py:attribute:: subscopes
      :type:  dict[str, str]


   .. py:attribute:: secondaryFile_dsl_fields
      :type:  set[str]


   .. py:attribute:: allow_attachments


   .. 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 exernal 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)


   .. py:method:: validate_links(document, base_url, all_doc_ids, strict_foreign_properties = False)


