schema_salad.ref_resolver
Module Contents
Classes
A Dict where all keys are normalized using the provided function. |
|
Functions
|
|
|
|
Convert ruamel.yaml exception to our type. |
|
|
Attributes
- schema_salad.ref_resolver.typeDSLregex
- schema_salad.ref_resolver.file_uri(path, split_frag=False)
- schema_salad.ref_resolver.to_validation_exception(e)
Convert ruamel.yaml exception to our type.
- Parameters:
e (ruamel.yaml.error.MarkedYAMLError) –
- Return type:
- class schema_salad.ref_resolver.NormDict(normalize=str)
Bases:
digraph inheritance5b4caf496b { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "Dict" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "NormDict" [URL="#schema_salad.ref_resolver.NormDict",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A Dict where all keys are normalized using the provided function."]; "Dict" -> "NormDict" [arrowsize=0.5,style="setlinewidth(0.5)"]; }Dict
[str
,Union
[ruamel.yaml.comments.CommentedMap
,ruamel.yaml.comments.CommentedSeq
,str
,None
]]A Dict where all keys are normalized using the provided function.
- __getitem__(key)
x.__getitem__(y) <==> x[y]
- Parameters:
key (Any) –
- Return type:
Any
- __setitem__(key, value)
Set self[key] to value.
- Parameters:
key (Any) –
value (Any) –
- Return type:
Any
- __delitem__(key)
Delete self[key].
- Parameters:
key (Any) –
- Return type:
Any
- __contains__(key)
True if the dictionary has the specified key, else False.
- Parameters:
key (Any) –
- Return type:
- __del__()
- Return type:
None
- class schema_salad.ref_resolver.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)
- Parameters:
ctx (schema_salad.utils.ContextType) –
schemagraph (Optional[rdflib.graph.Graph]) –
foreign_properties (Optional[Set[str]]) –
idx (Optional[schema_salad.utils.IdxType]) –
cache (Optional[schema_salad.utils.CacheType]) –
session (Optional[requests.sessions.Session]) –
fetcher_constructor (Optional[schema_salad.utils.FetcherCallableType]) –
skip_schemas (Optional[bool]) –
url_fields (Optional[Set[str]]) –
allow_attachments (Optional[schema_salad.utils.AttachmentsType]) –
- expand_url(url, base_url, scoped_id=False, vocab_term=False, scoped_ref=None)
- add_schemas(ns, base_url)
- add_context(newcontext)
- Parameters:
newcontext (schema_salad.utils.ContextType) –
- Return type:
None
- resolve_ref(ref, base_url=None, checklinks=True, strict_foreign_properties=False, content_types=None)
- resolve_all(document, base_url, file_base=None, checklinks=True, strict_foreign_properties=False)
- fetch(url, inject_ids=True, content_types=None)
- validate_scoped(field, link, docid)
- validate_link(field, link, docid, all_doc_ids)