{
  "$id": "file-comp.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$ref": "contentitem.schema.json",
  "required": ["type", "sourceUrl", "sourceType"],
  "properties": {
    "type": {
      "type": "string",
      "description": "Should always be set to file type"
    },
    "sourceType": {
      "type": "string",
      "description": "The source type of the file. Must be set to box",
      "enum": ["box", "dummy"]
    },
    "sourceUrl": {
      "type": "string",
      "description": "The source url of the file. Must be a Box file url"
    }
  },
  "if": {
    "properties": {
      "sourceType": { "const": "box" }
    }
  },
  "then": {
    "properties": {
      "sourceUrl": {
        "pattern": "https://\\w+\\.app\\.box\\.com/file/\\d+"
      }
    }
  }
}
