##// END OF EJS Templates
Fix errors
Jessica B. Hamrick -
Show More
@@ -1,307 +1,317 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": "Outputs of cell, to be defined.",
179 "description": "Execution, display, or stream outputs.",
180 "type": "array",
180 "type": "array",
181 "required": true,
181 "required": true,
182 "items": [
182 "items": {
183 {"$ref": "/definitions/pyout_output"}
183 "type": [
184 {"$ref": "/definitions/display_data_output"}
184 {"$ref": "/definitions/pyout_output"},
185 {"$ref": "/definitions/stream_output"}
185 {"$ref": "/definitions/display_data_output"},
186 ]
186 {"$ref": "/definitions/stream_output"}
187 ]
188 }
187 },
189 },
188 "collapsed": {
190 "collapsed": {
189 "description": "Whether the cell is collapsed/expanded.",
191 "description": "Whether the cell is collapsed/expanded.",
190 "type": "boolean",
192 "type": "boolean",
191 "required": true
193 "required": true
192 },
194 },
193 "autoscroll": {
195 "autoscroll": {
194 "description": "Whether the cell's output should autoscroll.",
196 "description": "Whether the cell's output should autoscroll.",
195 "type": "boolean",
197 "type": "boolean",
196 "required": true
198 "required": true
197 },
199 },
198 "prompt_number": {
200 "prompt_number": {
199 "description": "The code cell's prompt number. Will be null if the cell has not been run.",
201 "description": "The code cell's prompt number. Will be null if the cell has not been run.",
200 "type": ["integer", "null"],
202 "type": ["integer", "null"],
201 "required": true,
203 "required": true,
202 "minimum": 0
204 "minimum": 0
203 }
205 }
204 }
206 }
205 },
207 },
206
208
207 "pyout_output": {
209 "pyout_output": {
208 "description": "Result of executing a code cell.",
210 "description": "Result of executing a code cell.",
209 "type": "object",
211 "type": "object",
212 "additionalProperties": false,
210 "properties": {
213 "properties": {
211 "output_type": {
214 "output_type": {
212 "description": "Type of cell output.",
215 "description": "Type of cell output.",
213 "enum": ["pyout"],
216 "enum": ["pyout"],
214 "required": true
217 "required": true
215 },
218 },
216 "metadata": {
219 "metadata": {
217 "description": "Cell output metadata.",
220 "description": "Cell output metadata.",
218 "type": "object",
221 "type": "object",
219 "required": true,
222 "required": true,
220 "additionalProperties": true
223 "additionalProperties": true
221 },
224 },
222 "prompt_number": {
225 "prompt_number": {
223 "description": "The code cell's prompt number. Will be null if the cell has not been run.",
226 "description": "The code cell's prompt number. Will be null if the cell has not been run.",
224 "type": ["integer", "null"],
227 "type": ["integer", "null"],
225 "required": true,
228 "required": true,
226 "minimum": 0
229 "minimum": 0
227 }
230 },
228 "text": {
231 "text": {
229 "description": "The cell's text output, represented as an array of strings.",
232 "description": "The cell's text output, represented as an array of strings.",
230 "type": "array",
233 "type": "array",
231 "required": false,
234 "required": false,
232 "items": {"type": "string"}
235 "items": {"type": "string"}
233 },
236 },
234 "html": {
237 "html": {
235 "description": "The cell's html output, represented as an array of strings.",
238 "description": "The cell's html output, represented as an array of strings.",
236 "type": "array",
239 "type": "array",
237 "required": false,
240 "required": false,
238 "items": {"type": "string"}
241 "items": {"type": "string"}
239 },
242 },
240 "png": {
243 "png": {
241 "description": "The cell's png output.",
244 "description": "The cell's png output.",
242 "type": "string",
245 "type": "string",
243 "required": false,
246 "required": false
244 }
247 }
245 }
248 }
246 },
249 },
247
250
248 "display_data_output": {
251 "display_data_output": {
249 "description": "Display data output from a code cell.",
252 "description": "Display data output from a code cell.",
250 "type": "object",
253 "type": "object",
254 "additionalProperties": false,
251 "properties": {
255 "properties": {
252 "output_type": {
256 "output_type": {
253 "description": "Type of cell output.",
257 "description": "Type of cell output.",
254 "enum": ["display_data"],
258 "enum": ["display_data"],
255 "required": true
259 "required": true
256 },
260 },
257 "metadata": {
261 "metadata": {
258 "description": "Cell output metadata.",
262 "description": "Cell output metadata.",
259 "type": "object",
263 "type": "object",
260 "required": true,
264 "required": true,
261 "additionalProperties": true
265 "additionalProperties": true
262 },
266 },
263 "text": {
267 "text": {
264 "description": "The display data text output, represented as an array of strings.",
268 "description": "The display data text output, represented as an array of strings.",
265 "type": "array",
269 "type": "array",
266 "required": false,
270 "required": false,
267 "items": {"type": "string"}
271 "items": {"type": "string"}
268 },
272 },
269 "javascript": {
273 "javascript": {
270 "description": "The cell's javascript output, represented as an array of strings.",
274 "description": "The cell's javascript output, represented as an array of strings.",
271 "type": "array",
275 "type": "array",
272 "required": false,
276 "required": false,
273 "items": {"type": "string"}
277 "items": {"type": "string"}
274 },
278 },
279 "png": {
280 "description": "The cell's png output.",
281 "type": "string",
282 "required": false
283 }
275 }
284 }
276 },
285 },
277
286
278 "stream_output": {
287 "stream_output": {
279 "description": "Stream output from a code cell.",
288 "description": "Stream output from a code cell.",
280 "type": "object",
289 "type": "object",
290 "additionalProperties": false,
281 "properties": {
291 "properties": {
282 "output_type": {
292 "output_type": {
283 "description": "Type of cell output.",
293 "description": "Type of cell output.",
284 "enum": ["stream"],
294 "enum": ["stream"],
285 "required": true
295 "required": true
286 },
296 },
287 "metadata": {
297 "metadata": {
288 "description": "Cell output metadata.",
298 "description": "Cell output metadata.",
289 "type": "object",
299 "type": "object",
290 "required": true,
300 "required": true,
291 "additionalProperties": true
301 "additionalProperties": true
292 },
302 },
293 "stream": {
303 "stream": {
294 "description": "The stream type/destination.",
304 "description": "The stream type/destination.",
295 "type": "string",
305 "type": "string",
296 "required": true
306 "required": true
297 },
307 },
298 "text": {
308 "text": {
299 "description": "The stream's text output, represented as an array of strings.",
309 "description": "The stream's text output, represented as an array of strings.",
300 "type": "array",
310 "type": "array",
301 "required": false,
311 "required": false,
302 "items": {"type": "string"}
312 "items": {"type": "string"}
303 }
313 }
304 }
314 }
305 }
315 }
306 }
316 }
307 }
317 }
General Comments 0
You need to be logged in to leave comments. Login now