Currently, data modelers who write LinkML but are schematic-conscious include schematic validation rules directly as annotations in YAML for the most straightforward interop. However, there are LinkML modelers who do not necessarily think of schematic JSON-LD as a main target and specify constraints in pure LinkML. So an example min-max constraint in LinkML like:
age:
description: Human age in years.
range: float
minimum_value: 0
maximum_value: 120
would be translated to schematic syntax: inRange 0 120 error.
However, not all translations are possible. A lot of translation from LinkML constraints to schematic validation rules will be approximate or impossible, so this will cover the easy subset that can be translated well.
Currently, data modelers who write LinkML but are schematic-conscious include schematic validation rules directly as annotations in YAML for the most straightforward interop. However, there are LinkML modelers who do not necessarily think of schematic JSON-LD as a main target and specify constraints in pure LinkML. So an example min-max constraint in LinkML like:
would be translated to schematic syntax:
inRange 0 120 error
.However, not all translations are possible. A lot of translation from LinkML constraints to schematic validation rules will be approximate or impossible, so this will cover the easy subset that can be translated well.