{
  "title": "Include",
  "@id": "stencila:Include",
  "category": "text",
  "description": "Include content from an external source (e.g. file, URL).",
  "role": "secondary",
  "status": "unstable",
  "extends": "Entity",
  "properties": {
    "type": {
      "@id": "schema:type",
      "description": "The name of the type.",
      "type": "string",
      "enum": [
        "Include"
      ],
      "default": "Include",
      "from": "Entity"
    },
    "id": {
      "@id": "schema:id",
      "description": "The identifier for this item.",
      "type": "string",
      "from": "Entity"
    },
    "meta": {
      "@id": "stencila:meta",
      "description": "Metadata associated with this item.",
      "type": "object",
      "from": "Entity"
    },
    "source": {
      "@id": "stencila:source",
      "description": "The external source of the content, a file path or URL.",
      "type": "string",
      "from": "Include"
    },
    "mediaType": {
      "@id": "schema:encodingFormat",
      "aliases": [
        "encodingFormat"
      ],
      "description": "Media type of the source content.",
      "type": "string",
      "$comment": "Typically expressed using a file name extensions (e.g. `md`) or a\nMIME type (e.g. `text/md`).\n",
      "from": "Include"
    },
    "buildDigest": {
      "@id": "stencila:buildDigest",
      "description": "The SHA-256 digest of the `source` and `mediaType` properties the last time the node was built.",
      "type": "string",
      "$comment": "Used to determine whether it is necessary to re-build the node (i.e. update the `content` property\ndue to new content in the `source` or a change in the `mediaType`).\n",
      "from": "Include"
    },
    "content": {
      "@id": "stencila:content",
      "description": "The structured content decoded from the source.",
      "type": "array",
      "items": {
        "$ref": "BlockContent.schema.json"
      },
      "$comment": "Assumes that included content will be block content i.e. that there will be limited\ninstances where a user would want to use an `Include` node to transclude inline content.\n",
      "from": "Include",
      "isArray": true
    }
  },
  "required": [
    "type",
    "source"
  ],
  "file": "Include.schema.yaml",
  "children": [],
  "descendants": [],
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schema.stenci.la/v1/Include.schema.json",
  "source": "https://github.com/stencila/schema/blob/master/schema/Include.schema.yaml",
  "type": "object",
  "propertyAliases": {
    "encodingFormat": "mediaType"
  },
  "additionalProperties": false
}
