Resolution Scope¶
-
class
jsl.resolutionscope.ResolutionScope(base='', current='', output='')[source]¶ An utility class to help with translating
idattributes offieldsinto 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
currentandoutputscopes 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 newResolutionScopeto be used when visiting the nested fields of the field with idfield_id.Return type: (str, ResolutionScope)
-
jsl.resolutionscope.EMPTY_SCOPE¶ An empty
ResolutionScope.