{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.dockfm.it/open-radio-standard/schema/live-0.1.json",
  "title": "Open Radio Live 0.1",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "version",
    "station",
    "live",
    "nowPlaying"
  ],
  "properties": {
    "version": {
      "const": "0.1"
    },
    "station": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        }
      },
      "additionalProperties": true
    },
    "live": {
      "type": "object",
      "required": [
        "isLive"
      ],
      "properties": {
        "isLive": {
          "type": "boolean"
        },
        "mode": {
          "type": "string",
          "enum": [
            "live",
            "automated",
            "relay",
            "unknown"
          ]
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endsAt": {
          "type": "string",
          "format": "date-time"
        },
        "presenter": {
          "type": "string",
          "maxLength": 120
        }
      },
      "additionalProperties": true
    },
    "nowPlaying": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "music",
            "talk",
            "jingle",
            "advertising",
            "news",
            "unknown"
          ]
        },
        "title": {
          "type": "string",
          "maxLength": 200
        },
        "artist": {
          "type": "string",
          "maxLength": 200
        },
        "show": {
          "type": "string",
          "maxLength": 200
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endsAt": {
          "type": "string",
          "format": "date-time"
        },
        "artwork": {
          "type": "string",
          "format": "uri",
          "pattern": "^https://"
        }
      },
      "additionalProperties": true
    },
    "next": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "title": {
          "type": "string",
          "maxLength": 200
        },
        "artist": {
          "type": "string",
          "maxLength": 200
        },
        "show": {
          "type": "string",
          "maxLength": 200
        },
        "startsAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": true
    },
    "schedule": {
      "type": "object",
      "properties": {
        "currentShow": {
          "type": "string",
          "maxLength": 200
        },
        "nextShow": {
          "type": "string",
          "maxLength": 200
        },
        "nextShowAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": true
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}