-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
The good news is that the LinkML model is itself written in LinkML, so it should be validatable. Unfortunately, most of those validation methods are designed around other formats (such as validating JSON, JSON-LD, RDF and so on) but I haven't found one for validating the YAML directly. Two possibilities:
- If we load the generated YAML Schema using the LinkML YAML loader, this should generate validation errors if something is wrong somewhere. We should probably write a unit test with a deliberately broken YAML file to make sure of that, though.
- We can convert the YAML Schema into JSON and then validate it using our JSON Schema. Note that @ShahimEssaid has implemented this in Visual Studio (https://github.com/cancerDHC/data-model-harmonization/blob/6f0fa9a659fe8f8e561cd76a4000a378d07e91cf/json-examples/json-examples.code-workspace), so there are ideas there we could reuse.
This might be something worth doing upstream in LinkML so that every LinkML model's generated JSON Schema can be automatically validated.
Metadata
Metadata
Assignees
Labels
No labels