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