Skip to content

Commit 4d688c8

Browse files
feat(openenum): add is_open boolean slot to enum expressions
1 parent d028ff3 commit 4d688c8

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

linkml_model/model/schema/meta.yaml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ subsets:
129129
# Slots #
130130
# ==================================
131131
slots:
132-
133132
# -----------------------------------
134133
# Common metadata shared by all elements
135134
# -----------------------------------
@@ -650,6 +649,29 @@ slots:
650649
exact_mappings:
651650
- cdisc:PermissibleValue
652651

652+
is_open:
653+
domain: enum_expression
654+
range: boolean
655+
description: >-
656+
Whether the enumeration is open, meaning that values outside of the set of
657+
permissible values are allowed. If true, the enumeration is open and data values
658+
that are not in the set of permissible values are permitted (though they SHOULD be
659+
drawn from the permissible values if available). If false (runtime default), the
660+
enumeration is closed and data values MUST be drawn from the set of permissible values.
661+
ifabsent: False
662+
comments:
663+
- An open enumeration is analogous to the `allow-other="yes"` construct in the OSCAL Metamodel.
664+
- When an enum is open, the permissible values are advisory - they document the recommended
665+
or expected values but do not constrain the range. In JSON Schema this maps to a plain string.
666+
see_also:
667+
- https://pages.nist.gov/OSCAL/learn/tutorials/general/extension/#value
668+
- https://github.com/linkml/linkml/issues/127
669+
- https://github.com/linkml/linkml/pull/3712
670+
in_subset:
671+
- SpecificationSubset
672+
# BasicSubset
673+
status: testing
674+
653675
enum_uri:
654676
aliases:
655677
- public ID
@@ -2568,7 +2590,6 @@ slots:
25682590
# Classes #
25692591
# ==================================
25702592
classes:
2571-
25722593
Anything:
25732594
class_uri: linkml:Any
25742595

@@ -2782,6 +2803,7 @@ classes:
27822803
- code_set_version
27832804
- pv_formula
27842805
- permissible_values
2806+
- is_open
27852807
- include
27862808
- minus
27872809
- inherits

0 commit comments

Comments
 (0)