From 617485316e83a2c9e0acce31a026a0c51d4fb105 Mon Sep 17 00:00:00 2001 From: Silvano Cirujano Cuesta Date: Fri, 25 Oct 2024 11:20:56 +0200 Subject: [PATCH] fix(permissiblevalue): serialization Serialization of `PermissibleValue(text='value')` should be `'value'`, instead it is `PermissibleValue({"text": 'value'})`. This patch fixes it. Signed-off-by: Silvano Cirujano Cuesta --- linkml_runtime/linkml_model/meta.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linkml_runtime/linkml_model/meta.py b/linkml_runtime/linkml_model/meta.py index fee7f676..8df715b3 100644 --- a/linkml_runtime/linkml_model/meta.py +++ b/linkml_runtime/linkml_model/meta.py @@ -4014,6 +4014,9 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): super().__post_init__(**kwargs) + def __repr__(self): + return repr(getattr(self, 'text')) + @dataclass(repr=False) class UniqueKey(YAMLRoot):