{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "composer.schema.json",
  "title": "Composer record",
  "type": "object",
  "required": ["slug", "name", "source"],
  "properties": {
    "slug": {"type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"},
    "name": {"type": "string", "minLength": 1},
    "altNames": {"type": "array", "items": {"type": "string"}},
    "wikidata": {"type": ["string", "null"], "pattern": "^(Q[0-9]+)?$"},
    "born": {
      "type": ["object", "null"],
      "properties": {"label": {"type": "string"}, "year": {"type": ["integer", "null"]}}
    },
    "died": {
      "type": ["object", "null"],
      "properties": {"label": {"type": "string"}, "year": {"type": ["integer", "null"]}}
    },
    "links": {"type": "object", "additionalProperties": {"type": ["string", "null"]}},
    "source": {"type": "string"},
    "licence": {"type": ["string", "null"]}
  }
}
