Show More
@@ -1,353 +1,353 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 | }, |
|
171 | }, | |
172 | "source": { |
|
172 | "source": { | |
173 | "description": "Contents of the cell, represented as an array of lines.", |
|
173 | "description": "Contents of the cell, represented as an array of lines.", | |
174 | "type": "array", |
|
174 | "type": "array", | |
175 | "required": true, |
|
175 | "required": true, | |
176 | "items": {"type": "string"} |
|
176 | "items": {"type": "string"} | |
177 | }, |
|
177 | }, | |
178 | "outputs": { |
|
178 | "outputs": { | |
179 | "description": "Execution, display, or stream outputs.", |
|
179 | "description": "Execution, display, or stream outputs.", | |
180 | "type": "array", |
|
180 | "type": "array", | |
181 | "required": true, |
|
181 | "required": true, | |
182 | "items": { |
|
182 | "items": { | |
183 | "type": [ |
|
183 | "type": [ | |
184 | {"$ref": "/definitions/execute_output"}, |
|
184 | {"$ref": "/definitions/execute_output"}, | |
185 | {"$ref": "/definitions/display_data_output"}, |
|
185 | {"$ref": "/definitions/display_data_output"}, | |
186 | {"$ref": "/definitions/stream_output"}, |
|
186 | {"$ref": "/definitions/stream_output"}, | |
187 | {"$ref": "/definitions/error_output"} |
|
187 | {"$ref": "/definitions/error_output"} | |
188 | ] |
|
188 | ] | |
189 | } |
|
189 | } | |
190 | }, |
|
190 | }, | |
191 | "collapsed": { |
|
191 | "collapsed": { | |
192 | "description": "Whether the cell is collapsed/expanded.", |
|
192 | "description": "Whether the cell is collapsed/expanded.", | |
193 | "type": "boolean", |
|
193 | "type": "boolean", | |
194 | "required": true |
|
194 | "required": true | |
195 | }, |
|
195 | }, | |
196 | "autoscroll": { |
|
196 | "autoscroll": { | |
197 | "description": "Whether the cell's output should autoscroll.", |
|
197 | "description": "Whether the cell's output should autoscroll.", | |
198 | "type": "boolean", |
|
198 | "type": "boolean", | |
199 | "required": true |
|
199 | "required": true | |
200 | }, |
|
200 | }, | |
201 | "prompt_number": { |
|
201 | "prompt_number": { | |
202 | "description": "The code cell's prompt number. Will be null if the cell has not been run.", |
|
202 | "description": "The code cell's prompt number. Will be null if the cell has not been run.", | |
203 | "type": ["integer", "null"], |
|
203 | "type": ["integer", "null"], | |
204 | "required": true, |
|
204 | "required": true, | |
205 | "minimum": 0 |
|
205 | "minimum": 0 | |
206 | } |
|
206 | } | |
207 | } |
|
207 | } | |
208 | }, |
|
208 | }, | |
209 |
|
209 | |||
210 | "execute_output": { |
|
210 | "execute_output": { | |
211 | "description": "Result of executing a code cell.", |
|
211 | "description": "Result of executing a code cell.", | |
212 | "type": "object", |
|
212 | "type": "object", | |
213 | "additionalProperties": false, |
|
213 | "additionalProperties": false, | |
214 | "properties": { |
|
214 | "properties": { | |
215 | "output_type": { |
|
215 | "output_type": { | |
216 | "description": "Type of cell output.", |
|
216 | "description": "Type of cell output.", | |
217 | "enum": ["execute_output"], |
|
217 | "enum": ["execute_output"], | |
218 | "required": true |
|
218 | "required": true | |
219 | }, |
|
219 | }, | |
220 | "metadata": { |
|
220 | "metadata": { | |
221 | "description": "Cell output metadata.", |
|
221 | "description": "Cell output metadata.", | |
222 | "type": "object", |
|
222 | "type": "object", | |
223 | "required": true, |
|
223 | "required": true, | |
224 | "additionalProperties": true |
|
224 | "additionalProperties": true | |
225 | }, |
|
225 | }, | |
226 | "prompt_number": { |
|
226 | "prompt_number": { | |
227 | "description": "The code cell's prompt number. Will be null if the cell has not been run.", |
|
227 | "description": "The code cell's prompt number. Will be null if the cell has not been run.", | |
228 | "type": ["integer", "null"], |
|
228 | "type": ["integer", "null"], | |
229 | "required": true, |
|
229 | "required": true, | |
230 | "minimum": 0 |
|
230 | "minimum": 0 | |
231 | }, |
|
231 | }, | |
232 | "text": { |
|
232 | "text": { | |
233 | "description": "The cell's text output, represented as an array of strings.", |
|
233 | "description": "The cell's text output, represented as an array of strings.", | |
234 | "type": "array", |
|
234 | "type": "array", | |
235 | "required": false, |
|
235 | "required": false, | |
236 | "items": {"type": "string"} |
|
236 | "items": {"type": "string"} | |
237 | }, |
|
237 | }, | |
238 | "html": { |
|
238 | "html": { | |
239 | "description": "The cell's html output, represented as an array of strings.", |
|
239 | "description": "The cell's html output, represented as an array of strings.", | |
240 | "type": "array", |
|
240 | "type": "array", | |
241 | "required": false, |
|
241 | "required": false, | |
242 | "items": {"type": "string"} |
|
242 | "items": {"type": "string"} | |
243 | }, |
|
243 | }, | |
244 | "png": { |
|
244 | "png": { | |
245 | "description": "The cell's png output.", |
|
245 | "description": "The cell's png output.", | |
246 | "type": "string", |
|
246 | "type": "string", | |
247 | "required": false |
|
247 | "required": false | |
248 | } |
|
248 | } | |
249 | } |
|
249 | } | |
250 | }, |
|
250 | }, | |
251 |
|
251 | |||
252 | "display_data_output": { |
|
252 | "display_data_output": { | |
253 | "description": "Display data output from a code cell.", |
|
253 | "description": "Display data output from a code cell.", | |
254 | "type": "object", |
|
254 | "type": "object", | |
255 | "additionalProperties": false, |
|
255 | "additionalProperties": false, | |
256 | "properties": { |
|
256 | "properties": { | |
257 | "output_type": { |
|
257 | "output_type": { | |
258 | "description": "Type of cell output.", |
|
258 | "description": "Type of cell output.", | |
259 | "enum": ["display_data"], |
|
259 | "enum": ["display_data"], | |
260 | "required": true |
|
260 | "required": true | |
261 | }, |
|
261 | }, | |
262 | "metadata": { |
|
262 | "metadata": { | |
263 | "description": "Cell output metadata.", |
|
263 | "description": "Cell output metadata.", | |
264 | "type": "object", |
|
264 | "type": "object", | |
265 | "required": true, |
|
265 | "required": true, | |
266 | "additionalProperties": true |
|
266 | "additionalProperties": true | |
267 | }, |
|
267 | }, | |
268 | "text": { |
|
268 | "text": { | |
269 | "description": "The display data text output, represented as an array of strings.", |
|
269 | "description": "The display data text output, represented as an array of strings.", | |
270 | "type": "array", |
|
270 | "type": "array", | |
271 | "required": false, |
|
271 | "required": false, | |
272 | "items": {"type": "string"} |
|
272 | "items": {"type": "string"} | |
273 | }, |
|
273 | }, | |
274 | "javascript": { |
|
274 | "javascript": { | |
275 | "description": "The cell's javascript output, represented as an array of strings.", |
|
275 | "description": "The cell's javascript output, represented as an array of strings.", | |
276 | "type": "array", |
|
276 | "type": "array", | |
277 | "required": false, |
|
277 | "required": false, | |
278 | "items": {"type": "string"} |
|
278 | "items": {"type": "string"} | |
279 | }, |
|
279 | }, | |
280 | "png": { |
|
280 | "png": { | |
281 | "description": "The cell's png output.", |
|
281 | "description": "The cell's png output.", | |
282 | "type": "string", |
|
282 | "type": "string", | |
283 | "required": false |
|
283 | "required": false | |
284 | } |
|
284 | } | |
285 | } |
|
285 | } | |
286 | }, |
|
286 | }, | |
287 |
|
287 | |||
288 | "stream_output": { |
|
288 | "stream_output": { | |
289 | "description": "Stream output from a code cell.", |
|
289 | "description": "Stream output from a code cell.", | |
290 | "type": "object", |
|
290 | "type": "object", | |
291 | "additionalProperties": false, |
|
291 | "additionalProperties": false, | |
292 | "properties": { |
|
292 | "properties": { | |
293 | "output_type": { |
|
293 | "output_type": { | |
294 | "description": "Type of cell output.", |
|
294 | "description": "Type of cell output.", | |
295 | "enum": ["stream"], |
|
295 | "enum": ["stream"], | |
296 | "required": true |
|
296 | "required": true | |
297 | }, |
|
297 | }, | |
298 | "metadata": { |
|
298 | "metadata": { | |
299 | "description": "Cell output metadata.", |
|
299 | "description": "Cell output metadata.", | |
300 | "type": "object", |
|
300 | "type": "object", | |
301 | "required": true, |
|
301 | "required": true, | |
302 | "additionalProperties": true |
|
302 | "additionalProperties": true | |
303 | }, |
|
303 | }, | |
304 | "stream": { |
|
304 | "stream": { | |
305 | "description": "The stream type/destination.", |
|
305 | "description": "The stream type/destination.", | |
306 | "type": "string", |
|
306 | "type": "string", | |
307 | "required": true |
|
307 | "required": true | |
308 | }, |
|
308 | }, | |
309 | "text": { |
|
309 | "text": { | |
310 | "description": "The stream's text output, represented as an array of strings.", |
|
310 | "description": "The stream's text output, represented as an array of strings.", | |
311 | "type": "array", |
|
311 | "type": "array", | |
312 | "required": false, |
|
312 | "required": false, | |
313 | "items": {"type": "string"} |
|
313 | "items": {"type": "string"} | |
314 | } |
|
314 | } | |
315 | } |
|
315 | } | |
316 | }, |
|
316 | }, | |
317 |
|
317 | |||
318 | "error_output": { |
|
318 | "error_output": { | |
319 | "description": "Output of an error that occurred during code cell execution.", |
|
319 | "description": "Output of an error that occurred during code cell execution.", | |
320 | "type": "object", |
|
320 | "type": "object", | |
321 | "additionalProperties": false, |
|
321 | "additionalProperties": false, | |
322 | "properties": { |
|
322 | "properties": { | |
323 | "output_type": { |
|
323 | "output_type": { | |
324 | "description": "Type of cell output.", |
|
324 | "description": "Type of cell output.", | |
325 | "enum": ["error"], |
|
325 | "enum": ["error"], | |
326 | "required": true |
|
326 | "required": true | |
327 | }, |
|
327 | }, | |
328 | "metadata": { |
|
328 | "metadata": { | |
329 | "description": "Cell output metadata.", |
|
329 | "description": "Cell output metadata.", | |
330 | "type": "object", |
|
330 | "type": "object", | |
331 | "required": true, |
|
331 | "required": true, | |
332 | "additionalProperties": true |
|
332 | "additionalProperties": true | |
333 | }, |
|
333 | }, | |
334 | "ename": { |
|
334 | "ename": { | |
335 | "description": "The name of the error.", |
|
335 | "description": "The name of the error.", | |
336 | "type": "string", |
|
336 | "type": "string", | |
337 | "required": true |
|
337 | "required": true | |
338 | }, |
|
338 | }, | |
339 | "evalue": { |
|
339 | "evalue": { | |
340 | "description": "The value, or message, of the error.", |
|
340 | "description": "The value, or message, of the error.", | |
341 | "type": "string", |
|
341 | "type": "string", | |
342 | "required": true |
|
342 | "required": true | |
343 | }, |
|
343 | }, | |
344 | "traceback": { |
|
344 | "traceback": { | |
345 | "description": "The error's traceback, represented as an array of strings.", |
|
345 | "description": "The error's traceback, represented as an array of strings.", | |
346 | "type": "array", |
|
346 | "type": "array", | |
347 |
"required": |
|
347 | "required": true, | |
348 | "items": {"type": "string"} |
|
348 | "items": {"type": "string"} | |
349 | } |
|
349 | } | |
350 | } |
|
350 | } | |
351 | } |
|
351 | } | |
352 | } |
|
352 | } | |
353 | } |
|
353 | } |
General Comments 0
You need to be logged in to leave comments.
Login now