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