Resolution Scope¶
-
class
jsl.resolutionscope.
ResolutionScope
(base='', current='', output='')[source]¶ An utility class to help with translating
id
attributes offields
into JSON schema"id"
properties.Parameters: - base (str) – A URI, a resolution scope of the outermost schema.
- current (str) – A URI, a resolution scope of the current schema.
- output (str) – A URI, an output part (expressed by parent schema id properties) scope of the current schema.
-
base
¶ A resolution scope of the outermost schema.
-
current
¶ A resolution scope of the current schema.
-
output
¶ An output part (expressed by parent schema id properties) scope of the current schema.
-
replace
(current=None, output=None)[source]¶ Returns a copy of the scope with the
current
andoutput
scopes replaced.
-
alter
(field_id)[source]¶ Returns a pair, where the first element is the identifier to be used as a value for the
"id"
JSON schema field and the second is a newResolutionScope
to be used when visiting the nested fields of the field with idfield_id
.Return type: (str, ResolutionScope
)
-
jsl.resolutionscope.
EMPTY_SCOPE
¶ An empty
ResolutionScope
.