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