ts_ids_core.schema.ids_schema module¶
- Model IdsSchema[source]¶
Bases:
IdsElementBase top-level IDS.
Show JSON schema
{ "description": "Base top-level IDS.", "type": "object", "properties": { "@idsType": { "description": "Also known as IDS slug. Defined by TetraScience.", "type": "string" }, "@idsVersion": { "description": "IDS version. Defined by TetraScience.", "type": "string" }, "@idsNamespace": { "description": "IDS namespace. Defined by TetraScience.", "type": "string" } }, "$id": "NotImplemented", "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "required": [ "@idsType", "@idsVersion", "@idsNamespace" ] }
- Validators:
all_abstract_fields_implemented»all fields
- field ids_namespace: Abstract[Required[str]] (alias '@idsNamespace')¶
IDS namespace. Defined by TetraScience.
- field ids_type: Abstract[Required[str]] (alias '@idsType')¶
Also known as IDS slug. Defined by TetraScience.
- field ids_version: Abstract[Required[str]] (alias '@idsVersion')¶
IDS version. Defined by TetraScience.
- validator is_valid_version_string » ids_version[source]¶
Assert that the passed-in value conforms to semantic versioning if the value is not None.
- Parameters:
value – The passed-in value to be validated.
- Returns:
The passed-in value, unchanged.
- Validates:
- schema_extra_metadata: ClassVar[SchemaExtraMetadataType] = {'$id': NotImplemented, '$schema': 'http://json-schema.org/draft-07/schema#'}¶
Key/value pairs to add to the JSON Schema. These values will not be in the output of method
dict()norjson(). That is, they won’t be in the IDS instance. To indicate that the key/value pair is abstract and thus expected to be overridden by the child class, set the value toNotImplemented. Note that in child classes thetyping.ClassVartype hint must be provided in order to indicate thatschema_extra_metadatais not an IDS Field.
- Model TetraDataSchema[source]¶
Bases:
IdsSchemaTop-level IDS designed to follow Tetra Data conventions.
Show JSON schema
{ "description": "Top-level IDS designed to follow Tetra Data conventions.", "type": "object", "properties": { "@idsType": { "description": "Also known as IDS slug. Defined by TetraScience.", "type": "string" }, "@idsVersion": { "description": "IDS version. Defined by TetraScience.", "type": "string" }, "@idsNamespace": { "description": "IDS namespace. Defined by TetraScience.", "type": "string" } }, "$id": "NotImplemented", "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "is_tetra_data_schema": true, "required": [ "@idsType", "@idsVersion", "@idsNamespace" ] }
- Validators:
all_abstract_fields_implemented»all fieldsis_valid_version_string»ids_version