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.

Potentially problematic release.


This version of linkml might be problematic. Click here for more details.

@@ -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