ref_resolver module¶
JSON Schema URI resolution scopes and dereferencing
https://tools.ietf.org/id/draft-zyp-json-schema-04.html#rfc.section.7
Code adapted from https://github.com/Julian/jsonschema
Classes:
|
Resolve JSON References. |
Functions:
|
|
|
Return definition from path. |
|
Resolve a remote |
- class gemseo.third_party.fastjsonschema.ref_resolver.RefResolver(base_uri, schema, store={}, cache=True, handlers={})[source]¶
Bases:
object
Resolve JSON References.
base_uri is URI of the referring document from the schema.
Methods:
from_schema
(schema[, handlers])Construct a resolver from a JSON schema object.
Get current scope and return it as a valid function name.
get_uri
()in_scope
(scope)Context manager to handle current scope.
resolving
(ref)Context manager which resolves a JSON
ref
and enters the resolution scope of this ref.walk
(node)Walk thru schema and dereferencing
id
and$ref
instances- classmethod from_schema(schema, handlers={}, **kwargs)[source]¶
Construct a resolver from a JSON schema object.
- gemseo.third_party.fastjsonschema.ref_resolver.resolve_path(schema, fragment)[source]¶
Return definition from path.
Path is unescaped according https://tools.ietf.org/html/rfc6901