-
Notifications
You must be signed in to change notification settings - Fork 159
Open
Labels
bugSomething that should work but isn't, with an example and a test case.Something that should work but isn't, with an example and a test case.community-generated
Description
Describe the bug
This is minor issue, but linkml-run-examples fails when YAML data contains hyphenated keys (i.e. how-many).
YAML allows hyphenated keys but they cannot be Python identifier kwargs.
Cause
_load_from_dict passes original YAML dictionary keys as **kwargs directly into py_target_class(**new_dict_obj) without normalizing hyphenated key values.
Workaround
Ensure --no-use-type-designators is passed to linkml-run-examples in the justfile recipe, allowing validation by the JSON validator (which already uses underscored property names).
Example Data
- id: ac-01_odp.03
props:
- name: alt-identifier
value: ac-1_prm_2
- name: label
value: AC-01_ODP[03]
class: sp800-53a
select:
how-many: one-or-more <----------- Hyphenated key
choice:
- organization-level
- mission/business process-level
- system-level
Version of LinkML you are using
linkml, version 1.1.13.post3593.dev0+5f3601b9
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething that should work but isn't, with an example and a test case.Something that should work but isn't, with an example and a test case.community-generated