UNPKG

2.61 kBJSONView Raw
1{
2 "title": "Include",
3 "@id": "stencila:Include",
4 "category": "text",
5 "description": "Include content from an external source (e.g. file, URL).",
6 "role": "secondary",
7 "status": "unstable",
8 "extends": "Entity",
9 "properties": {
10 "type": {
11 "@id": "schema:type",
12 "description": "The name of the type.",
13 "type": "string",
14 "enum": [
15 "Include"
16 ],
17 "default": "Include",
18 "from": "Entity"
19 },
20 "id": {
21 "@id": "schema:id",
22 "description": "The identifier for this item.",
23 "type": "string",
24 "from": "Entity"
25 },
26 "meta": {
27 "@id": "stencila:meta",
28 "description": "Metadata associated with this item.",
29 "type": "object",
30 "from": "Entity"
31 },
32 "source": {
33 "@id": "stencila:source",
34 "description": "The external source of the content, a file path or URL.",
35 "type": "string",
36 "from": "Include"
37 },
38 "mediaType": {
39 "@id": "schema:encodingFormat",
40 "aliases": [
41 "encodingFormat"
42 ],
43 "description": "Media type of the source content.",
44 "type": "string",
45 "$comment": "Typically expressed using a file name extensions (e.g. `md`) or a\nMIME type (e.g. `text/md`).\n",
46 "from": "Include"
47 },
48 "buildDigest": {
49 "@id": "stencila:buildDigest",
50 "description": "The SHA-256 digest of the `source` and `mediaType` properties the last time the node was built.",
51 "type": "string",
52 "$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",
53 "from": "Include"
54 },
55 "content": {
56 "@id": "stencila:content",
57 "description": "The structured content decoded from the source.",
58 "type": "array",
59 "items": {
60 "$ref": "BlockContent.schema.json"
61 },
62 "$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",
63 "from": "Include",
64 "isArray": true
65 }
66 },
67 "required": [
68 "type",
69 "source"
70 ],
71 "file": "Include.schema.yaml",
72 "children": [],
73 "descendants": [],
74 "$schema": "http://json-schema.org/draft-07/schema#",
75 "$id": "https://schema.stenci.la/v1/Include.schema.json",
76 "source": "https://github.com/stencila/schema/blob/master/schema/Include.schema.yaml",
77 "type": "object",
78 "propertyAliases": {
79 "encodingFormat": "mediaType"
80 },
81 "additionalProperties": false
82}