BioSchemas / specifications

Issue tracker, technical wiki, and example markup
https://bioschemas.org
54 stars 52 forks source link

MolecularEntity profile missing subjectOf inherited from Thing #593

Open sneumann opened 2 years ago

sneumann commented 2 years ago

Hi, validating a MolecularEntity I created I get an error in the validation with ElixirTeSS/bioschemas-validator:

Validating against profile MolecularEntity 0.5-RELEASE.json
...
These properties names are in the metadata but not in the Bioschemas profile:['subjectOf']

Indeed, subjectOf is in the type https://bioschemas.org/types/MolecularEntity/0.3-RELEASE-2019_09_02 but not in the profile https://bioschemas.org/profiles/MolecularEntity/0.5-RELEASE

=> Should it be there ? Or is the validation output correct and we don't want subjectOf in the profile ? Should we automagically slurp in everything from the parent type(s) and mark it optional in the profile ?

Yours, Steffen

gtsueng commented 2 years ago

Hi Steffen,

For the types, all parent classes are potentially inheritable, but it's not necessarily the case that the Bioschemas working group that developed the schema would even mention the use of every inheritable property. The lack of mention and constraints for subjectOf is consistent with the crosswalk for the 0.5-RELEASE profile, but someone from the chemistry working group like @egonw would be able to confirm whether or not this exclusion was intentional.

JSON-schema validators will usually just ignore properties for which no constraints have been defined. Do you get the same error if you validate against the schema using something like: https://www.jsonschemavalidator.net/ ?

egonw commented 2 years ago

I do not remember if we had a reason to remove subjectOf but do not remember we removed it intentionally. Sounds like we can add it back as optional. cc @AlasdairGray

gtsueng commented 1 year ago

The new draft (0.7) now includes subjectOf in the JSON-LD. This issue can be closed once the pull request #727 for the corresponding changes to the website have been merged.