{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Schema for Core server Messages",
  "description": "Core <-> Oden",
  "type": "object",
  "required": [
    "type",
    "data",
    "session_id"
  ],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "upload_video",
        "qr_request",
        "cap_stream"
      ]
    },
    "data": {
      "anyOf": [
        {
          "$ref": "upload_video.schema#/definitions/upload_video"
        },
        {
           "$ref": "qr_request.schema#/definitions/qr_request"
        },
        {
           "$ref": "cap_stream.schema#/definitions/cap_stream"
        }
      ]
    },
    "session_id": {
      "type": [
        "string"
      ]
    },
    "request_id": {
      "type": [
        "string"
      ]
    }
  }
}
