{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "schema for the fully native mobile endpoint",
  "type": "object",
  "id": "/video",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": ["video"]
        },
        "id": {
          "type": "number"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "subType": {
              "type": "string",
              "enum": ["brightcoveVideo", "youtubeVideo"]
            },
            "videoId": {
              "type": "string",
              "pattern": "[a-zA-Z0-9-]+"
            },
            "title": {
              "type": "string"
            },
            "leadMedia": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "$ref": "/image"
                }
              ],
              "description": "only present in lead videos"
            }
          },
          "required": [
            "subType",
            "videoId",
            "title"
          ]
        },
        "links": {
          "type": "object",
          "properties": {
            "screenshotUrl": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "type": "string",
                  "format": "uri",
                  "description": "only ever used for brightcove videos"
                }
              ]
            }
          },
          "required": [
            "screenshotUrl"
          ]
        }
      },
      "required": [
        "type",
        "attributes",
        "links"
      ]
    }
  },
  "required": [
    "data"
  ]
}