1 | {
|
2 | "title": "ListItem",
|
3 | "@id": "schema:ListItem",
|
4 | "extends": "Thing",
|
5 | "role": "tertiary",
|
6 | "status": "stable",
|
7 | "category": "text",
|
8 | "description": "A single item in a list.",
|
9 | "$comment": "This is an implementation, and extension, of schema.org [`ListItem`](https://schema.org/ListItem).\nIt extends schema.ord `ListItem` by adding `content` and `isChecked` properties.\n\nAnalogues of `ListItem` in other schema include:\n - JATS XML `<list-item>`](https://jats.nlm.nih.gov/articleauthoring/tag-library/1.2/element/list-item.html)\n - HTML [`<li>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li)\n - MDAST [`ListItem`](https://github.com/syntax-tree/mdast#listitem)\n - OpenDocument [`<text:list-item>`](http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1415154_253892949)\n",
|
10 | "properties": {
|
11 | "type": {
|
12 | "@id": "schema:type",
|
13 | "description": "The name of the type.",
|
14 | "type": "string",
|
15 | "enum": [
|
16 | "ListItem"
|
17 | ],
|
18 | "default": "ListItem",
|
19 | "from": "Entity"
|
20 | },
|
21 | "id": {
|
22 | "@id": "schema:id",
|
23 | "description": "The identifier for this item.",
|
24 | "type": "string",
|
25 | "from": "Entity"
|
26 | },
|
27 | "meta": {
|
28 | "@id": "stencila:meta",
|
29 | "description": "Metadata associated with this item.",
|
30 | "type": "object",
|
31 | "from": "Entity"
|
32 | },
|
33 | "alternateNames": {
|
34 | "@id": "schema:alternateName",
|
35 | "description": "Alternate names (aliases) for the item.",
|
36 | "type": "array",
|
37 | "items": {
|
38 | "type": "string"
|
39 | },
|
40 | "from": "Thing",
|
41 | "isArray": true,
|
42 | "isPlural": true,
|
43 | "aliases": [
|
44 | "alternateName"
|
45 | ]
|
46 | },
|
47 | "description": {
|
48 | "@id": "schema:description",
|
49 | "description": "A description of the item.",
|
50 | "$comment": "Allows for the description to be an array of nodes (e.g. an array of inline content,\nor a couple of paragraphs), or a string. The `minItems` restriction avoids a string\nbeing coerced into an array with a single string item.\n",
|
51 | "anyOf": [
|
52 | {
|
53 | "type": "array",
|
54 | "items": {
|
55 | "$ref": "BlockContent.schema.json"
|
56 | }
|
57 | },
|
58 | {
|
59 | "type": "array",
|
60 | "items": {
|
61 | "$ref": "InlineContent.schema.json"
|
62 | },
|
63 | "minItems": 2
|
64 | },
|
65 | {
|
66 | "type": "string"
|
67 | }
|
68 | ],
|
69 | "from": "Thing"
|
70 | },
|
71 | "identifiers": {
|
72 | "@id": "schema:identifier",
|
73 | "description": "Any kind of identifier for any kind of Thing.",
|
74 | "$comment": "Some identifiers have specific properties e.g the `issn` property for\nthe `Periodical` type. These should be used in preference to this\nproperty which is intended for identifiers that do not yet have a\nspecific property. Identifiers can be represented as strings, but\nusing a `PropertyValue` will usually be better because it allows\nfor `propertyID` (i.e. the type of identifier).\n",
|
75 | "type": "array",
|
76 | "items": {
|
77 | "anyOf": [
|
78 | {
|
79 | "$ref": "PropertyValue.schema.json"
|
80 | },
|
81 | {
|
82 | "type": "string"
|
83 | }
|
84 | ]
|
85 | },
|
86 | "from": "Thing",
|
87 | "isArray": true,
|
88 | "isPlural": true,
|
89 | "aliases": [
|
90 | "identifier"
|
91 | ]
|
92 | },
|
93 | "images": {
|
94 | "@id": "schema:image",
|
95 | "description": "Images of the item.",
|
96 | "type": "array",
|
97 | "items": {
|
98 | "anyOf": [
|
99 | {
|
100 | "$ref": "ImageObject.schema.json"
|
101 | },
|
102 | {
|
103 | "type": "string",
|
104 | "format": "uri"
|
105 | }
|
106 | ]
|
107 | },
|
108 | "from": "Thing",
|
109 | "isArray": true,
|
110 | "isPlural": true,
|
111 | "aliases": [
|
112 | "image"
|
113 | ]
|
114 | },
|
115 | "name": {
|
116 | "@id": "schema:name",
|
117 | "description": "The name of the item.",
|
118 | "type": "string",
|
119 | "from": "Thing"
|
120 | },
|
121 | "url": {
|
122 | "@id": "schema:url",
|
123 | "description": "The URL of the item.",
|
124 | "type": "string",
|
125 | "format": "uri",
|
126 | "from": "Thing"
|
127 | },
|
128 | "content": {
|
129 | "@id": "stencila:content",
|
130 | "description": "The content of the list item.",
|
131 | "$comment": "Use either `content` or `item`, not both.",
|
132 | "anyOf": [
|
133 | {
|
134 | "type": "array",
|
135 | "items": {
|
136 | "$ref": "BlockContent.schema.json"
|
137 | }
|
138 | },
|
139 | {
|
140 | "type": "array",
|
141 | "items": {
|
142 | "$ref": "InlineContent.schema.json"
|
143 | }
|
144 | }
|
145 | ],
|
146 | "from": "ListItem"
|
147 | },
|
148 | "isChecked": {
|
149 | "@id": "stencila:isChecked",
|
150 | "description": "A flag to indicate if this list item is checked.",
|
151 | "type": "boolean",
|
152 | "default": false,
|
153 | "from": "ListItem"
|
154 | },
|
155 | "item": {
|
156 | "@id": "schema:item",
|
157 | "description": "The item represented by this list item.",
|
158 | "$comment": "Use either `item` or `content`, not both.",
|
159 | "allOf": [
|
160 | {
|
161 | "$ref": "Node.schema.json"
|
162 | }
|
163 | ],
|
164 | "from": "ListItem"
|
165 | },
|
166 | "position": {
|
167 | "@id": "schema:position",
|
168 | "description": "The position of the item in a series or sequence of items.",
|
169 | "type": "integer",
|
170 | "from": "ListItem"
|
171 | }
|
172 | },
|
173 | "examples": [
|
174 | {
|
175 | "type": "ListItem",
|
176 | "content": [
|
177 | "List Item Content"
|
178 | ]
|
179 | },
|
180 | {
|
181 | "type": "ListItem",
|
182 | "content": [
|
183 | "List Item Content",
|
184 | {
|
185 | "type": "List",
|
186 | "order": "ordered",
|
187 | "items": [
|
188 | "Nested Item One"
|
189 | ]
|
190 | }
|
191 | ]
|
192 | },
|
193 | {
|
194 | "type": "ListItem",
|
195 | "isChecked": true,
|
196 | "content": [
|
197 | "Completed todo item"
|
198 | ]
|
199 | }
|
200 | ],
|
201 | "file": "ListItem.schema.yaml",
|
202 | "children": [],
|
203 | "descendants": [],
|
204 | "$schema": "http://json-schema.org/draft-07/schema#",
|
205 | "$id": "https://schema.stenci.la/v1/ListItem.schema.json",
|
206 | "source": "https://github.com/stencila/schema/blob/master/schema/ListItem.schema.yaml",
|
207 | "type": "object",
|
208 | "additionalProperties": false,
|
209 | "required": [
|
210 | "type"
|
211 | ],
|
212 | "propertyAliases": {
|
213 | "alternateName": "alternateNames",
|
214 | "identifier": "identifiers",
|
215 | "image": "images"
|
216 | }
|
217 | }
|