{
  "$id": "video-comp.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$ref": "file-comp.schema.json",
  "required": [ "type", "sourceUrl", "sourceType" ],
  "properties": {
    "type": {
      "type": "string",
      "description": "Should always be set to video",
      "const": "video"
    },
    "captionUrls": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The url to the caption file for the video, if it exists"
    },
    "transcript": {
      "type": "string",
      "description": "The transcript of the video, if it exists"
    }
  },
  "if": {
    "properties": {
      "sourceType": { "const": "box" }
    }
  },
  "then": {
    "properties": {
      "captionUrls": {
        "items": {
          "pattern": "https://\\w+\\.app\\.box\\.com/file/\\d+"
        }
      }
    }
  }
}
