Fix incorrect use of value slots in extra_slots examples.#243
Fix incorrect use of value slots in extra_slots examples.#243gouttegd wants to merge 1 commit intolinkml:mainfrom
value slots in extra_slots examples.#243Conversation
The examples provided in the meta-schema for the `extra_slots` slot
incorrectly use the `value` slot of the `Example` class, as in:
```yaml
extra_slots:
examples:
- value:
allowed: true
```
This is incorrect because the `value` slot is string-typed: it cannot
contain an _object_ such as `{allowed: true}`.
This is bad because (1) it is not a good sign that LinkML's own
meta-schema is invalid according to its own rules, and (2) this prevent
the schema from being loaded when using an implementation that actually
cares about typing issues.
The `Example` class defines another slot, `value_object` (aliased to
simply `object`), that is specifically intended to represent values that
are not simple strings. This commit updates the examples on the
`extra_slots` definition to use `object` rather than `value`.
closes linkml/linkml#3245
|
This PR requires that issue 3246 in |
sneakers-the-rat
left a comment
There was a problem hiding this comment.
Whoopsie daisy, my bad
|
It does seem like we should be running the validator on the metamodel in CI to avoid this in the future |
That’s already the case: the “main” CI workflow does call But So, to fix things here and now, two solutions: A. Wait until a new version of B. Amend the Makefile to replace the use of I am inclined to think that B should be the way to go, as But I leave the decision to the LinkML devs. |
The examples provided in the meta-schema for the
extra_slotsslot incorrectly use thevalueslot of theExampleclass, as in:This is incorrect because the
valueslot is string-typed: it cannot contain an object such as{allowed: true}.This is bad because (1) it is not a good sign that LinkML's own meta-schema is invalid according to its own rules, and (2) this prevents the schema from being loaded when using an implementation that actually cares about typing issues.
The
Exampleclass defines another slot,value_object(aliased to simplyobject), that is specifically intended to represent values that are not simple strings. This commit updates the examples on theextra_slotsdefinition to useobjectrather thanvalue.closes linkml/linkml#3245