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