FAIR-MI / miiid-schema

A metadata schema for the Minimum Information about Intermicrobial Interaction Data (MIIID) using LinkML
https://fair-mi.github.io/miiid-schema/
GNU General Public License v3.0
3 stars 0 forks source link

Union as range without type #10

Open cpauvert opened 1 year ago

cpauvert commented 1 year ago

follow up of #9 to fix the validation. Here the issue is that all data are valid

linkml-validate -s src/miiid_schema/schema/miiid_schema.yaml -C IntermicrobialInteraction\ \
   src/data/examples/valid/IntermicrobialInteraction-pairwise-with-missing-data.yaml
# None for valid data
linkml-validate -s src/miiid_schema/schema/miiid_schema.yaml -C IntermicrobialInteraction \
   src/data/examples/invalid/IntermicrobialInteraction-pairwise-with-wrong-missing-data.yaml
# None for invalid data as well

It turns out that the integers or enums are converted to strings:

linkml-convert -s src/miiid_schema/schema/miiid_schema.yaml -C IntermicrobialInteraction \
   src/data/examples/invalid/IntermicrobialInteraction-pairwise-with-wrong-missing-data.yaml
{
  "id": "miiid:pairwise",
  "participants": [
    "Acidobacteria",
    "Gammaproteobacteria"
  ],
  "tax_id": [
    "NA",    # <----
    "1236" # <----
  ],
  "evidence_type": "high throughput evidence used in automatic assertion",
  "reference": "https://doi.org/10.1038/ismej.2011.119",
  "@type": "IntermicrobialInteraction"
}