##// END OF EJS Templates
source is required in all cells
MinRK -
Show More
@@ -1,347 +1,347 b''
1 1 {
2 2 "$schema": "http://json-schema.org/draft-04/schema#",
3 3 "description": "IPython Notebook v4.0 JSON schema.",
4 4 "type": "object",
5 5 "additionalProperties": false,
6 6 "required": ["metadata", "nbformat_minor", "nbformat", "cells"],
7 7 "properties": {
8 8 "metadata": {
9 9 "description": "Notebook root-level metadata.",
10 10 "type": "object",
11 11 "additionalProperties": true,
12 12 "properties": {
13 13 "kernel_info": {
14 14 "description": "Kernel information.",
15 15 "type": "object",
16 16 "required": ["name", "language"],
17 17 "properties": {
18 18 "name": {
19 19 "description": "Name of the kernel specification.",
20 20 "type": "string"
21 21 },
22 22 "language": {
23 23 "description": "The programming language which this kernel runs.",
24 24 "type": "string"
25 25 },
26 26 "codemirror_mode": {
27 27 "description": "The codemirror mode to use for code in this language.",
28 28 "type": "string"
29 29 }
30 30 }
31 31 },
32 32 "signature": {
33 33 "description": "Hash of the notebook.",
34 34 "type": "string"
35 35 },
36 36 "orig_nbformat": {
37 37 "description": "Original notebook format (major number) before converting the notebook between versions.",
38 38 "type": "integer",
39 39 "minimum": 1
40 40 }
41 41 }
42 42 },
43 43 "nbformat_minor": {
44 44 "description": "Notebook format (minor number). Incremented for backward compatible changes to the notebook format.",
45 45 "type": "integer",
46 46 "minimum": 0
47 47 },
48 48 "nbformat": {
49 49 "description": "Notebook format (major number). Incremented between backwards incompatible changes to the notebook format.",
50 50 "type": "integer",
51 51 "minimum": 4,
52 52 "maximum": 4
53 53 },
54 54 "cells": {
55 55 "description": "Array of cells of the current notebook.",
56 56 "type": "array",
57 57 "items": {
58 58 "type": "object",
59 59 "oneOf": [
60 60 {"$ref": "#/definitions/raw_cell"},
61 61 {"$ref": "#/definitions/markdown_cell"},
62 62 {"$ref": "#/definitions/heading_cell"},
63 63 {"$ref": "#/definitions/code_cell"}
64 64 ]
65 65 }
66 66 }
67 67 },
68 68
69 69 "definitions": {
70 70
71 71 "raw_cell": {
72 72 "description": "Notebook raw nbconvert cell.",
73 73 "type": "object",
74 74 "additionalProperties": false,
75 "required": ["cell_type", "metadata"],
75 "required": ["cell_type", "metadata", "source"],
76 76 "properties": {
77 77 "cell_type": {
78 78 "description": "String identifying the type of cell.",
79 79 "enum": ["raw"]
80 80 },
81 81 "metadata": {
82 82 "description": "Cell-level metadata.",
83 83 "type": "object",
84 84 "additionalProperties": true,
85 85 "properties": {
86 86 "format": {
87 87 "description": "Raw cell metadata format for nbconvert.",
88 88 "type": "string"
89 89 },
90 90 "name": {"$ref": "#/definitions/misc/metadata_name"},
91 91 "tags": {"$ref": "#/definitions/misc/metadata_tags"}
92 92 }
93 93 },
94 94 "source": {"$ref": "#/definitions/misc/source"}
95 95 }
96 96 },
97 97
98 98 "markdown_cell": {
99 99 "description": "Notebook markdown cell.",
100 100 "type": "object",
101 101 "additionalProperties": false,
102 "required": ["cell_type", "metadata"],
102 "required": ["cell_type", "metadata", "source"],
103 103 "properties": {
104 104 "cell_type": {
105 105 "description": "String identifying the type of cell.",
106 106 "enum": ["markdown"]
107 107 },
108 108 "metadata": {
109 109 "description": "Cell-level metadata.",
110 110 "type": "object",
111 111 "properties": {
112 112 "name": {"$ref": "#/definitions/misc/metadata_name"},
113 113 "tags": {"$ref": "#/definitions/misc/metadata_tags"}
114 114 },
115 115 "additionalProperties": true
116 116 },
117 117 "source": {"$ref": "#/definitions/misc/source"}
118 118 }
119 119 },
120 120
121 121 "heading_cell": {
122 122 "description": "Notebook heading cell.",
123 123 "type": "object",
124 124 "additionalProperties": false,
125 125 "required": ["cell_type", "metadata", "source", "level"],
126 126 "properties": {
127 127 "cell_type": {
128 128 "description": "String identifying the type of cell.",
129 129 "enum": ["heading"]
130 130 },
131 131 "metadata": {
132 132 "description": "Cell-level metadata.",
133 133 "type": "object",
134 134 "properties": {
135 135 "name": {"$ref": "#/definitions/misc/metadata_name"},
136 136 "tags": {"$ref": "#/definitions/misc/metadata_tags"}
137 137 },
138 138 "additionalProperties": true
139 139 },
140 140 "source": {"$ref": "#/definitions/misc/source"},
141 141 "level": {
142 142 "description": "Level of heading cells.",
143 143 "type": "integer",
144 144 "minimum": 1,
145 145 "maximum": 6
146 146 }
147 147 }
148 148 },
149 149
150 150 "code_cell": {
151 151 "description": "Notebook code cell.",
152 152 "type": "object",
153 153 "additionalProperties": false,
154 154 "required": ["cell_type", "metadata", "source", "outputs", "prompt_number"],
155 155 "properties": {
156 156 "cell_type": {
157 157 "description": "String identifying the type of cell.",
158 158 "enum": ["code"]
159 159 },
160 160 "metadata": {
161 161 "description": "Cell-level metadata.",
162 162 "type": "object",
163 163 "additionalProperties": true,
164 164 "properties": {
165 165 "collapsed": {
166 166 "description": "Whether the cell is collapsed/expanded.",
167 167 "type": "boolean"
168 168 },
169 169 "autoscroll": {
170 170 "description": "Whether the cell's output is scrolled, unscrolled, or autoscrolled.",
171 171 "enum": [true, false, "auto"]
172 172 },
173 173 "name": {"$ref": "#/definitions/misc/metadata_name"},
174 174 "tags": {"$ref": "#/definitions/misc/metadata_tags"}
175 175 }
176 176 },
177 177 "source": {"$ref": "#/definitions/misc/source"},
178 178 "outputs": {
179 179 "description": "Execution, display, or stream outputs.",
180 180 "type": "array",
181 181 "items": {"$ref": "#/definitions/output"}
182 182 },
183 183 "prompt_number": {
184 184 "description": "The code cell's prompt number. Will be null if the cell has not been run.",
185 185 "type": ["integer", "null"],
186 186 "minimum": 0
187 187 }
188 188 }
189 189 },
190 190 "output": {
191 191 "type": "object",
192 192 "oneOf": [
193 193 {"$ref": "#/definitions/execute_result"},
194 194 {"$ref": "#/definitions/display_data"},
195 195 {"$ref": "#/definitions/stream"},
196 196 {"$ref": "#/definitions/error"}
197 197 ]
198 198 },
199 199 "execute_result": {
200 200 "description": "Result of executing a code cell.",
201 201 "type": "object",
202 202 "additionalProperties": false,
203 203 "required": ["output_type", "metadata", "prompt_number"],
204 204 "properties": {
205 205 "output_type": {
206 206 "description": "Type of cell output.",
207 207 "enum": ["execute_result"]
208 208 },
209 209 "prompt_number": {
210 210 "description": "A result's prompt number.",
211 211 "type": ["integer"],
212 212 "minimum": 0
213 213 },
214 214 "application/json": {
215 215 "type": "object"
216 216 },
217 217 "metadata": {"$ref": "#/definitions/misc/output_metadata"}
218 218 },
219 219 "patternProperties": {
220 220 "^(?!application/json$)[a-zA-Z0-9]+/[a-zA-Z0-9\\-\\+\\.]+$": {
221 221 "description": "mimetype output (e.g. text/plain), represented as either an array of strings or a string.",
222 222 "$ref": "#/definitions/misc/multiline_string"
223 223 }
224 224 }
225 225 },
226 226
227 227 "display_data": {
228 228 "description": "Data displayed as a result of code cell execution.",
229 229 "type": "object",
230 230 "additionalProperties": false,
231 231 "required": ["output_type", "metadata"],
232 232 "properties": {
233 233 "output_type": {
234 234 "description": "Type of cell output.",
235 235 "enum": ["display_data"]
236 236 },
237 237 "application/json": {
238 238 "type": "object"
239 239 },
240 240 "metadata": {"$ref": "#/definitions/misc/output_metadata"}
241 241 },
242 242 "patternProperties": {
243 243 "^(?!application/json$)[a-zA-Z0-9]+/[a-zA-Z0-9\\-\\+\\.]+$": {
244 244 "description": "mimetype output (e.g. text/plain), represented as either an array of strings or a string.",
245 245 "$ref": "#/definitions/misc/multiline_string"
246 246 }
247 247 }
248 248 },
249 249
250 250 "stream": {
251 251 "description": "Stream output from a code cell.",
252 252 "type": "object",
253 253 "additionalProperties": false,
254 254 "required": ["output_type", "metadata", "stream", "text"],
255 255 "properties": {
256 256 "output_type": {
257 257 "description": "Type of cell output.",
258 258 "enum": ["stream"]
259 259 },
260 260 "metadata": {"$ref": "#/definitions/misc/output_metadata"},
261 261 "stream": {
262 262 "description": "The stream type/destination.",
263 263 "type": "string"
264 264 },
265 265 "text": {
266 266 "description": "The stream's text output, represented as an array of strings.",
267 267 "$ref": "#/definitions/misc/multiline_string"
268 268 }
269 269 }
270 270 },
271 271
272 272 "error": {
273 273 "description": "Output of an error that occurred during code cell execution.",
274 274 "type": "object",
275 275 "additionalProperties": false,
276 276 "required": ["output_type", "metadata", "ename", "evalue", "traceback"],
277 277 "properties": {
278 278 "output_type": {
279 279 "description": "Type of cell output.",
280 280 "enum": ["error"]
281 281 },
282 282 "metadata": {"$ref": "#/definitions/misc/output_metadata"},
283 283 "ename": {
284 284 "description": "The name of the error.",
285 285 "type": "string"
286 286 },
287 287 "evalue": {
288 288 "description": "The value, or message, of the error.",
289 289 "type": "string"
290 290 },
291 291 "traceback": {
292 292 "description": "The error's traceback, represented as an array of strings.",
293 293 "type": "array",
294 294 "items": {"type": "string"}
295 295 }
296 296 }
297 297 },
298 298
299 299 "misc": {
300 300 "metadata_name": {
301 301 "description": "The cell's name. If present, must be a non-empty string.",
302 302 "type": "string",
303 303 "pattern": "^.+$"
304 304 },
305 305 "metadata_tags": {
306 306 "description": "The cell's tags. Tags must be unique, and must not contain commas.",
307 307 "type": "array",
308 308 "uniqueItems": true,
309 309 "items": {
310 310 "type": "string",
311 311 "pattern": "^[^,]+$"
312 312 }
313 313 },
314 314 "source": {
315 315 "description": "Contents of the cell, represented as an array of lines.",
316 316 "$ref": "#/definitions/misc/multiline_string"
317 317 },
318 318 "prompt_number": {
319 319 "description": "The code cell's prompt number. Will be null if the cell has not been run.",
320 320 "type": ["integer", "null"],
321 321 "minimum": 0
322 322 },
323 323 "mimetype": {
324 324 "patternProperties": {
325 325 "^[a-zA-Z0-9\\-\\+]+/[a-zA-Z0-9\\-\\+]+": {
326 326 "description": "The cell's mimetype output (e.g. text/plain), represented as either an array of strings or a string.",
327 327 "$ref": "#/definitions/misc/multiline_string"
328 328 }
329 329 }
330 330 },
331 331 "output_metadata": {
332 332 "description": "Cell output metadata.",
333 333 "type": "object",
334 334 "additionalProperties": true
335 335 },
336 336 "multiline_string": {
337 337 "oneOf" : [
338 338 {"type": "string"},
339 339 {
340 340 "type": "array",
341 341 "items": {"type": "string"}
342 342 }
343 343 ]
344 344 }
345 345 }
346 346 }
347 347 }
General Comments 0
You need to be logged in to leave comments. Login now