Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified linkml_model/excel/meta.xlsx
Binary file not shown.
3 changes: 3 additions & 0 deletions linkml_model/graphql/meta.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ type AnonymousEnumExpression implements EnumExpression
codeSetVersion: String
pvFormula: PvFormulaOptions
permissibleValues: [PermissibleValue]
isOpen: Boolean
include: [AnonymousEnumExpression]
minus: [AnonymousEnumExpression]
inherits: [EnumDefinition]
Expand Down Expand Up @@ -708,6 +709,7 @@ type EnumDefinition implements EnumExpression
codeSetVersion: String
pvFormula: PvFormulaOptions
permissibleValues: [PermissibleValue]
isOpen: Boolean
include: [AnonymousEnumExpression]
minus: [AnonymousEnumExpression]
inherits: [EnumDefinition]
Expand All @@ -723,6 +725,7 @@ type EnumExpression
codeSetVersion: String
pvFormula: PvFormulaOptions
permissibleValues: [PermissibleValue]
isOpen: Boolean
include: [AnonymousEnumExpression]
minus: [AnonymousEnumExpression]
inherits: [EnumDefinition]
Expand Down
4 changes: 4 additions & 0 deletions linkml_model/jsonld/meta.context.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,10 @@
"@type": "xsd:boolean",
"@id": "is_grouping_slot"
},
"is_open": {
"@type": "xsd:boolean",
"@id": "is_open"
},
"is_usage_slot": {
"@type": "xsd:boolean",
"@id": "is_usage_slot"
Expand Down
34 changes: 32 additions & 2 deletions linkml_model/jsonld/meta.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -1641,6 +1641,33 @@
"inlined": true,
"@type": "SlotDefinition"
},
{
"name": "is_open",
"definition_uri": "https://w3id.org/linkml/is_open",
"description": "Whether the enumeration is open, meaning that values outside of the set of permissible values are allowed. If true, the enumeration is open and data values that are not in the set of permissible values are permitted (though they SHOULD be drawn from the permissible values if available). If false (runtime default), the enumeration is closed and data values MUST be drawn from the set of permissible values.",
"comments": [
"An open enumeration is analogous to the `allow-other=\"yes\"` construct in the OSCAL Metamodel.",
"When an enum is open, the permissible value set is not exhaustive - they document the advised, recommended, or expected values but allow values outside the permissible set."
],
"in_subset": [
"SpecificationSubset"
],
"from_schema": "https://w3id.org/linkml/meta",
"see_also": [
"https://pages.nist.gov/metaschema/specification/syntax/constraints/#allow-other",
"https://github.com/linkml/linkml/issues/127",
"https://github.com/linkml/linkml/pull/3712"
],
"status": "testing",
"domain": "EnumExpression",
"slot_uri": "https://w3id.org/linkml/is_open",
"owner": "EnumExpression",
"domain_of": [
"EnumExpression"
],
"range": "boolean",
"@type": "SlotDefinition"
},
{
"name": "enum_uri",
"definition_uri": "https://w3id.org/linkml/enum_uri",
Expand Down Expand Up @@ -7304,6 +7331,7 @@
"code_set_version",
"pv_formula",
"permissible_values",
"is_open",
"include",
"minus",
"inherits",
Expand All @@ -7329,6 +7357,7 @@
"code_set_version",
"pv_formula",
"permissible_values",
"is_open",
"include",
"minus",
"inherits",
Expand Down Expand Up @@ -7434,6 +7463,7 @@
"code_set_version",
"pv_formula",
"permissible_values",
"is_open",
"include",
"minus",
"inherits",
Expand Down Expand Up @@ -8903,8 +8933,8 @@
],
"metamodel_version": "1.12.0",
"source_file": "meta.yaml",
"source_file_date": "2026-10-02T14:33:00",
"source_file_size": 102070,
"source_file_date": "2026-10-21T16:04:40",
"source_file_size": 103176,
"@type": "SchemaDefinition",
"@context": [
"staging/jsonld/meta.context.jsonld",
Expand Down
28 changes: 28 additions & 0 deletions linkml_model/jsonschema/meta.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,13 @@
"null"
]
},
"is_open": {
"description": "Whether the enumeration is open, meaning that values outside of the set of permissible values are allowed. If true, the enumeration is open and data values that are not in the set of permissible values are permitted (though they SHOULD be drawn from the permissible values if available). If false (runtime default), the enumeration is closed and data values MUST be drawn from the set of permissible values.",
"type": [
"boolean",
"null"
]
},
"matches": {
"anyOf": [
{
Expand Down Expand Up @@ -6527,6 +6534,13 @@
"null"
]
},
"is_open": {
"description": "Whether the enumeration is open, meaning that values outside of the set of permissible values are allowed. If true, the enumeration is open and data values that are not in the set of permissible values are permitted (though they SHOULD be drawn from the permissible values if available). If false (runtime default), the enumeration is closed and data values MUST be drawn from the set of permissible values.",
"type": [
"boolean",
"null"
]
},
"keywords": {
"description": "Keywords or tags used to describe the element",
"items": {
Expand Down Expand Up @@ -7126,6 +7140,13 @@
"null"
]
},
"is_open": {
"description": "Whether the enumeration is open, meaning that values outside of the set of permissible values are allowed. If true, the enumeration is open and data values that are not in the set of permissible values are permitted (though they SHOULD be drawn from the permissible values if available). If false (runtime default), the enumeration is closed and data values MUST be drawn from the set of permissible values.",
"type": [
"boolean",
"null"
]
},
"keywords": {
"description": "Keywords or tags used to describe the element",
"items": {
Expand Down Expand Up @@ -7428,6 +7449,13 @@
"null"
]
},
"is_open": {
"description": "Whether the enumeration is open, meaning that values outside of the set of permissible values are allowed. If true, the enumeration is open and data values that are not in the set of permissible values are permitted (though they SHOULD be drawn from the permissible values if available). If false (runtime default), the enumeration is closed and data values MUST be drawn from the set of permissible values.",
"type": [
"boolean",
"null"
]
},
"matches": {
"anyOf": [
{
Expand Down
15 changes: 15 additions & 0 deletions linkml_model/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,7 @@ class AnonymousEnumExpression(YAMLRoot):
code_set_version: Optional[str] = None
pv_formula: Optional[Union[str, "PvFormulaOptions"]] = None
permissible_values: Optional[Union[dict[Union[str, PermissibleValueText], Union[dict, "PermissibleValue"]], list[Union[dict, "PermissibleValue"]]]] = empty_dict()
is_open: Optional[Union[bool, Bool]] = None
include: Optional[Union[Union[dict, "AnonymousEnumExpression"], list[Union[dict, "AnonymousEnumExpression"]]]] = empty_list()
minus: Optional[Union[Union[dict, "AnonymousEnumExpression"], list[Union[dict, "AnonymousEnumExpression"]]]] = empty_list()
inherits: Optional[Union[Union[str, EnumDefinitionName], list[Union[str, EnumDefinitionName]]]] = empty_list()
Expand All @@ -927,6 +928,9 @@ def __post_init__(self, *_: str, **kwargs: Any):

self._normalize_inlined_as_dict(slot_name="permissible_values", slot_type=PermissibleValue, key_name="text", keyed=True)

if self.is_open is not None and not isinstance(self.is_open, Bool):
self.is_open = Bool(self.is_open)

if not isinstance(self.include, list):
self.include = [self.include] if self.include is not None else []
self.include = [v if isinstance(v, AnonymousEnumExpression) else AnonymousEnumExpression(**as_dict(v)) for v in self.include]
Expand Down Expand Up @@ -971,6 +975,7 @@ class EnumDefinition(Definition):
code_set_version: Optional[str] = None
pv_formula: Optional[Union[str, "PvFormulaOptions"]] = None
permissible_values: Optional[Union[dict[Union[str, PermissibleValueText], Union[dict, "PermissibleValue"]], list[Union[dict, "PermissibleValue"]]]] = empty_dict()
is_open: Optional[Union[bool, Bool]] = None
include: Optional[Union[Union[dict, AnonymousEnumExpression], list[Union[dict, AnonymousEnumExpression]]]] = empty_list()
minus: Optional[Union[Union[dict, AnonymousEnumExpression], list[Union[dict, AnonymousEnumExpression]]]] = empty_list()
inherits: Optional[Union[Union[str, EnumDefinitionName], list[Union[str, EnumDefinitionName]]]] = empty_list()
Expand Down Expand Up @@ -1001,6 +1006,9 @@ def __post_init__(self, *_: str, **kwargs: Any):

self._normalize_inlined_as_dict(slot_name="permissible_values", slot_type=PermissibleValue, key_name="text", keyed=True)

if self.is_open is not None and not isinstance(self.is_open, Bool):
self.is_open = Bool(self.is_open)

if not isinstance(self.include, list):
self.include = [self.include] if self.include is not None else []
self.include = [v if isinstance(v, AnonymousEnumExpression) else AnonymousEnumExpression(**as_dict(v)) for v in self.include]
Expand Down Expand Up @@ -1563,6 +1571,7 @@ class EnumExpression(Expression):
code_set_version: Optional[str] = None
pv_formula: Optional[Union[str, "PvFormulaOptions"]] = None
permissible_values: Optional[Union[dict[Union[str, PermissibleValueText], Union[dict, "PermissibleValue"]], list[Union[dict, "PermissibleValue"]]]] = empty_dict()
is_open: Optional[Union[bool, Bool]] = None
include: Optional[Union[Union[dict, AnonymousEnumExpression], list[Union[dict, AnonymousEnumExpression]]]] = empty_list()
minus: Optional[Union[Union[dict, AnonymousEnumExpression], list[Union[dict, AnonymousEnumExpression]]]] = empty_list()
inherits: Optional[Union[Union[str, EnumDefinitionName], list[Union[str, EnumDefinitionName]]]] = empty_list()
Expand All @@ -1585,6 +1594,9 @@ def __post_init__(self, *_: str, **kwargs: Any):

self._normalize_inlined_as_dict(slot_name="permissible_values", slot_type=PermissibleValue, key_name="text", keyed=True)

if self.is_open is not None and not isinstance(self.is_open, Bool):
self.is_open = Bool(self.is_open)

if not isinstance(self.include, list):
self.include = [self.include] if self.include is not None else []
self.include = [v if isinstance(v, AnonymousEnumExpression) else AnonymousEnumExpression(**as_dict(v)) for v in self.include]
Expand Down Expand Up @@ -4716,6 +4728,9 @@ class slots:
slots.permissible_values = Slot(uri=LINKML.permissible_values, name="permissible_values", curie=LINKML.curie('permissible_values'),
model_uri=LINKML.permissible_values, domain=EnumExpression, range=Optional[Union[dict[Union[str, PermissibleValueText], Union[dict, "PermissibleValue"]], list[Union[dict, "PermissibleValue"]]]])

slots.is_open = Slot(uri=LINKML.is_open, name="is_open", curie=LINKML.curie('is_open'),
model_uri=LINKML.is_open, domain=EnumExpression, range=Optional[Union[bool, Bool]])

slots.enum_uri = Slot(uri=LINKML.enum_uri, name="enum_uri", curie=LINKML.curie('enum_uri'),
model_uri=LINKML.enum_uri, domain=EnumDefinition, range=Optional[Union[str, URIorCURIE]])

Expand Down
22 changes: 22 additions & 0 deletions linkml_model/model/schema/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,27 @@ slots:
exact_mappings:
- cdisc:PermissibleValue

is_open:
Comment thread
noelmcloughlin marked this conversation as resolved.
Resolved
Comment thread
amc-corey-cox marked this conversation as resolved.
Resolved
domain: enum_expression
Comment thread
noelmcloughlin marked this conversation as resolved.
Resolved
range: boolean
description: >-
Whether the enumeration is open, meaning that values outside of the set of
permissible values are allowed. If true, the enumeration is open and data values
that are not in the set of permissible values are permitted (though they SHOULD be
drawn from the permissible values if available). If false (runtime default), the
enumeration is closed and data values MUST be drawn from the set of permissible values.
comments:
Comment thread
noelmcloughlin marked this conversation as resolved.
Resolved
- An open enumeration is analogous to the `allow-other="yes"` construct in the OSCAL Metamodel.
- When an enum is open, the permissible value set is not exhaustive - they document the
advised, recommended, or expected values but allow values outside the permissible set.
see_also:
- https://pages.nist.gov/metaschema/specification/syntax/constraints/#allow-other
- https://github.com/linkml/linkml/issues/127
- https://github.com/linkml/linkml/pull/3712
in_subset:
- SpecificationSubset
status: testing
Comment thread
amc-corey-cox marked this conversation as resolved.
Resolved

enum_uri:
aliases:
- public ID
Expand Down Expand Up @@ -2787,6 +2808,7 @@ classes:
- code_set_version
- pv_formula
- permissible_values
- is_open
- include
- minus
- inherits
Expand Down
Loading
Loading