specifications icon indicating copy to clipboard operation
specifications copied to clipboard

MolecularEntity profile missing subjectOf inherited from Thing

Open sneumann opened this issue 2 years ago • 3 comments

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

sneumann avatar Sep 27 '22 10:09 sneumann

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/ ?

gtsueng avatar Nov 08 '22 21:11 gtsueng

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

egonw avatar Nov 08 '22 21:11 egonw

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.

gtsueng avatar Jan 12 '23 17:01 gtsueng