
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",

  "$id": "metadata.schema.json",
  "title": "Dezrann Common Metadata",
  "description": "Common metadata fields applicable to corpus, opus, and source objects",
  "type": "object",
  "properties": {
    "contributors": {
      "type": "object",
      "description": "Contributor roles and names",
      "additionalProperties": {"type": "string"},
      "properties": {
        "composer": {"type": "string"},
        "artist": {"type": "string"},
        "performer": {"type": "string"},
        "lyricist": {"type": "string"},
        "arranger": {"type": "string"},
        "editor": {"type": "string"},
        "encoder": {"type": "string"},
        "transcriber": {"type": "string"},
        "analyst": {"type": "string"},
        "annotator": {"type": "string"},
        "maintainer": {"type": "string"}
      }
    },
    "text": {"type": "string", "description": "Descriptive text"},
    "license": {
      "oneOf": [
        {"type": "string"},
        {"type": "array", "items": {"type": "string"}}
      ],
      "description": "SPDX license identifier(s)"
    },
    "year": {"type": ["string", "integer"], "description": "Year or year range"},
    "album": {"type": "string", "description": "Album name"},
    "ref": {"type": "string", "format": "uri", "description": "External reference URL"}
  },
  "patternProperties": {
    "^ref:[a-zA-Z][a-zA-Z0-9_-]*$": {"type": "string", "description": "External reference"}
  },
  "additionalProperties": true
}

