openMetadataInitiative / openMINDS

Complete collection of schemas for the metadata models of the openMINDS metadata framework. All schemas are formatted in the openMINDS syntax (*.schema.omi.json).
MIT License
0 stars 3 forks source link

Indicate which version of a schema was used to create metadata instances #9

Open ehennestad opened 1 year ago

ehennestad commented 1 year ago

When saving a metadata instance it might be good to also specify which version of schema was used to create the instance.

For example: I create an instance using the Person schema from the latest version of openMINDS and save it to a JSON-LD file. If I (or someone else) loads it at a later time,, it might be good to know which version was used to create it in order to re-create the metadata instance in its original form?

ehennestad commented 3 months ago

Two suggestions (when saving instances to jsonld):

  1. add the version to the @type:

    "@type": "https://openminds.ebrains.eu/core/v3/Person"
  2. add a "custom" @version property

"@type": "https://openminds.ebrains.eu/core/Person",
"@version": "v3"
lzehl commented 1 month ago

Not sure how to solve this correctly. Instances can be valid for types from multiple versions. Potentially the second one could be adjusted by providing a list? Still not sure. @openMetadataInitiative/openminds-developers your thoughts?

olinux commented 1 month ago

My 2 cents about this:

lzehl commented 1 month ago

@olinux that means we would rather provide a convenience function (e.g. in the Python, Matlab packages) that could tell for an instance which openMINDS versions it can be used for?