openMetadataInitiative / openMINDS_Python

Python package for the openMINDS metadata models. The package contains all openMINDS schemas as Python classes in addition to schema base classes and utility methods.
MIT License
1 stars 2 forks source link

@type should not be given as a list [renamed from: to_jsonld()] #2

Closed lzehl closed 1 year ago

lzehl commented 1 year ago

I'm testing the Python package and noticed the following for "to_jsonld()":

If @context with @vocab is set the properties do not have to (should not ?) identify the vocab. Also @type should not be given as a list but as a string (turning it into a list is EBRAINS KG specific and not a requirement by JSONLD).

Example for a correct openMINDS JSONLD:

{
  "@context": {
    "@vocab": "https://openminds.ebrains.eu/vocab/"
  },
  "@id": "http://localhost/openminds/instance/person/ZaphodBeeblebrox",
  "@type": "https://openminds.ebrains.eu/core/Person",
  "familyName": "Beeblebrox",
  "givenName": "Zaphod"
}
apdavison commented 1 year ago

This has been separated into two issues: