datatagsuite / schema

DATS JSON schemas
https://datatagsuite.github.io/docs/html/dats.html
Other
11 stars 8 forks source link

data_repository_schema.json has top-level @type declaration #2

Closed jonathancrabtree closed 6 years ago

jonathancrabtree commented 6 years ago

All of the JSON schemas define the@type property within the properties property, but data_repository_schema.json is unique in that it has a @type property inside of properties and also at the top-level of the schema object. See the 6th and last lines of the following code snippet:

{
  "id": "https://w3id.org/dats/schema/data_repository_schema.json",
  "$schema": "http://json-schema.org/draft-04/schema",
  "title": "DATS data repository schema",
  "description": "A repository or catalog of datasets. It could be a primary repository or a repository that aggregates data existing in other repositories.",
  "@type": "DataRepository",
  "type": "object",
  "properties": {
    "@context": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "object"
        }
      ]
    },
    "@id": { "type": "string", "format": "uri" },
    "@type": { "type": "string", "enum": [ "DataRepository" ]},

I'm pretty sure this is a typo because the top-level @type declaration implies that the JSON schema object is itself a DataRepository instance, which it is not.

agbeltran commented 6 years ago

Thanks, indeed it was a mistake, now fixed.