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