Skip to content

Commit 2fd22d4

Browse files
add examples
1 parent 6861fb1 commit 2fd22d4

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

linkml_model/model/schema/meta.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,9 @@ slots:
13551355
extra_slots:
13561356
description: |
13571357
How a class instance handles extra data not specified in the class definition.
1358+
Note that this does *not* define the constraints that are placed on additional slots defined by inheriting classes.
13581359
1360+
Possible values:
13591361
- true: allow any additional data
13601362
- false: (default) forbid any additional data
13611363
- anonymous_slot_expression: allow only data matching this anonymous slot expression
@@ -1367,6 +1369,36 @@ slots:
13671369
in_subset:
13681370
- SpecificationSubset
13691371
- BasicSubset
1372+
examples:
1373+
- value: true
1374+
description: Allow all additional data
1375+
- value: false
1376+
description: Forbid any additional data
1377+
- value:
1378+
range: string
1379+
description: Allow additional data that are strings
1380+
- value:
1381+
range: AClassDefinition
1382+
description: Allow additional data if they are instances of the class definition "AClassDefinition"
1383+
- value:
1384+
any_of:
1385+
- range: string
1386+
- range: integer
1387+
description: allow additional data if they are either strings or integers
1388+
- value:
1389+
range: integer
1390+
multivalued: true
1391+
maximum_cardinality: 5
1392+
description: |
1393+
Allow additional data if they are lists of integers of at most length 5.
1394+
Note that this does *not* mean that a maximum of 5 extra slots are allowed.
1395+
- value:
1396+
range: integer
1397+
required: true
1398+
description: |
1399+
Allow additional data if they are integers.
1400+
`required` is meaningless in this context and ignored, since by definition all "extra" slots are optional.
1401+
13701402
13711403

13721404
# -----------------------------------

0 commit comments

Comments
 (0)