linkml 1.5.8rc1__py3-none-any.whl → 1.6.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- linkml/generators/jsonschemagen.py +8 -0
- linkml/generators/legacy/__init__.py +0 -0
- linkml/generators/owlgen.py +676 -391
- linkml/generators/pythongen.py +121 -17
- linkml/utils/generator.py +0 -1
- {linkml-1.5.8rc1.dist-info → linkml-1.6.1.dist-info}/METADATA +3 -3
- {linkml-1.5.8rc1.dist-info → linkml-1.6.1.dist-info}/RECORD +10 -9
- {linkml-1.5.8rc1.dist-info → linkml-1.6.1.dist-info}/LICENSE +0 -0
- {linkml-1.5.8rc1.dist-info → linkml-1.6.1.dist-info}/WHEEL +0 -0
- {linkml-1.5.8rc1.dist-info → linkml-1.6.1.dist-info}/entry_points.txt +0 -0
@@ -387,6 +387,14 @@ class JsonSchemaGenerator(Generator):
|
|
387
387
|
return JsonSchema()
|
388
388
|
|
389
389
|
constraints = JsonSchema()
|
390
|
+
if slot.range in self.schemaview.all_types().keys():
|
391
|
+
# types take lower priority
|
392
|
+
schema_type = self.schemaview.induced_type(slot.range)
|
393
|
+
constraints.add_keyword("pattern", schema_type.pattern)
|
394
|
+
constraints.add_keyword("minimum", schema_type.minimum_value)
|
395
|
+
constraints.add_keyword("maximum", schema_type.maximum_value)
|
396
|
+
constraints.add_keyword("const", schema_type.equals_string)
|
397
|
+
constraints.add_keyword("const", schema_type.equals_number)
|
390
398
|
constraints.add_keyword("pattern", slot.pattern)
|
391
399
|
constraints.add_keyword("minimum", slot.minimum_value)
|
392
400
|
constraints.add_keyword("maximum", slot.maximum_value)
|
File without changes
|