{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://radio2.org/schema/v0.2/schedule.schema.json",
  "title": "Radio 2.0 schedule document, version 0.2",
  "description": "The document at a manifest's schedule.json address: coming programmes, earliest first.",
  "type": "object",
  "required": ["timeZone", "items"],
  "additionalProperties": false,
  "properties": {
    "timeZone": { "type": "string", "minLength": 1, "maxLength": 64 },
    "items": {
      "type": "array",
      "maxItems": 1000,
      "items": {
        "type": "object",
        "required": ["title", "startsAt", "endsAt"],
        "additionalProperties": false,
        "properties": {
          "id": { "type": "string", "maxLength": 128 },
          "title": { "type": "string", "minLength": 1, "maxLength": 300 },
          "description": { "type": "string", "maxLength": 4000 },
          "presenters": {
            "type": "array",
            "maxItems": 20,
            "items": { "type": "string", "minLength": 1, "maxLength": 200 }
          },
          "live": { "type": "boolean" },
          "startsAt": { "type": "string", "format": "date-time" },
          "endsAt": { "type": "string", "format": "date-time" },
          "url": { "type": "string", "format": "uri", "maxLength": 2000 },
          "artwork": { "type": "string", "format": "uri", "maxLength": 2000 }
        }
      }
    }
  }
}
