##// END OF EJS Templates
Fix errors
Jessica B. Hamrick -
Show More
@@ -1,307 +1,317 b''
1 1 {
2 2 "$schema": "http://json-schema.org/draft-03/schema#",
3 3 "description": "IPython Notebook v4.0 JSON schema.",
4 4 "type": "object",
5 5 "additionalProperties": false,
6 6 "properties": {
7 7 "metadata": {
8 8 "description": "Notebook root-level metadata.",
9 9 "type": "object",
10 10 "required": true,
11 11 "additionalProperties": true,
12 12 "properties": {
13 13 "language": {
14 14 "description": "Language of the notebook's kernel.",
15 15 "type": "string",
16 16 "required": true
17 17 },
18 18 "kernel_info": {
19 19 "description": "Other kernel information, to be determined.",
20 20 "type": "object",
21 21 "required": true,
22 22 "additionalProperties": true
23 23 },
24 24 "signature": {
25 25 "description": "SHA256 hash of the notebook.",
26 26 "type": "string",
27 27 "required": true,
28 28 "pattern": "^sha256:[0-9a-f]{64}$"
29 29 }
30 30 }
31 31 },
32 32 "nbformat_minor": {
33 33 "description": "Notebook format (minor number). Incremented for slight changes to the notebook format.",
34 34 "type": "integer",
35 35 "required": true,
36 36 "minimum": 0
37 37 },
38 38 "nbformat": {
39 39 "description": "Notebook format (major number). Incremented between backwards incompatible changes to the notebook format.",
40 40 "type": "integer",
41 41 "required": true,
42 42 "minimum": 4
43 43 },
44 44 "orig_nbformat": {
45 45 "description": "Original notebook format (major number) before converting the notebook between versions.",
46 46 "type": "integer",
47 47 "required": false,
48 48 "minimum": 1
49 49 },
50 50 "cells": {
51 51 "description": "Array of cells of the current notebook.",
52 52 "type": "array",
53 53 "required": true,
54 54 "items": {
55 55 "type": [
56 56 {"$ref": "/definitions/raw_cell"},
57 57 {"$ref": "/definitions/markdown_cell"},
58 58 {"$ref": "/definitions/heading_cell"},
59 59 {"$ref": "/definitions/code_cell"}
60 60 ]
61 61 }
62 62 }
63 63 },
64 64
65 65 "definitions": {
66 66
67 67 "raw_cell": {
68 68 "description": "Notebook raw nbconvert cell.",
69 69 "type": "object",
70 70 "additionalProperties": false,
71 71 "properties": {
72 72 "cell_type": {
73 73 "description": "String identifying the type of cell.",
74 74 "enum": ["raw"],
75 75 "required": true
76 76 },
77 77 "metadata": {
78 78 "description": "Cell-level metadata.",
79 79 "type": "object",
80 80 "required": true,
81 81 "additionalProperties": true,
82 82 "properties": {
83 83 "format": {
84 84 "description": "Raw cell format, to be determined.",
85 85 "type": "string",
86 86 "required": false
87 87 }
88 88 }
89 89 },
90 90 "source": {
91 91 "description": "Contents of the cell, represented as an array of lines.",
92 92 "type": "array",
93 93 "required": true,
94 94 "items": {"type": "string"}
95 95 }
96 96 }
97 97 },
98 98
99 99 "markdown_cell": {
100 100 "description": "Notebook markdown cell.",
101 101 "type": "object",
102 102 "additionalProperties": false,
103 103 "properties": {
104 104 "cell_type": {
105 105 "description": "String identifying the type of cell.",
106 106 "enum": ["markdown"],
107 107 "required": true
108 108 },
109 109 "metadata": {
110 110 "description": "Cell-level metadata.",
111 111 "type": "object",
112 112 "required": true,
113 113 "additionalProperties": true
114 114 },
115 115 "source": {
116 116 "description": "Contents of the cell, represented as an array of lines.",
117 117 "type": "array",
118 118 "required": true,
119 119 "items": {"type": "string"}
120 120 }
121 121 }
122 122 },
123 123
124 124 "heading_cell": {
125 125 "description": "Notebook heading cell.",
126 126 "type": "object",
127 127 "additionalProperties": false,
128 128 "properties": {
129 129 "cell_type": {
130 130 "description": "String identifying the type of cell.",
131 131 "enum": ["heading"],
132 132 "required": true
133 133 },
134 134 "metadata": {
135 135 "description": "Cell-level metadata.",
136 136 "type": "object",
137 137 "required": true,
138 138 "additionalProperties": true
139 139 },
140 140 "source": {
141 141 "description": "Contents of the cell, represented as an array of lines.",
142 142 "type": "array",
143 143 "required": true,
144 144 "items": {"type": "string"}
145 145 },
146 146 "level": {
147 147 "description": "Level of heading cells.",
148 148 "type": "integer",
149 149 "required": true,
150 150 "minimum": 1,
151 151 "maximum": 6
152 152 }
153 153 }
154 154 },
155 155
156 156 "code_cell": {
157 157 "description": "Notebook code cell.",
158 158 "type": "object",
159 159 "additionalProperties": false,
160 160 "properties": {
161 161 "cell_type": {
162 162 "description": "String identifying the type of cell.",
163 163 "enum": ["code"],
164 164 "required": true
165 165 },
166 166 "metadata": {
167 167 "description": "Cell-level metadata.",
168 168 "type": "object",
169 169 "required": true,
170 170 "additionalProperties": true
171 171 },
172 172 "source": {
173 173 "description": "Contents of the cell, represented as an array of lines.",
174 174 "type": "array",
175 175 "required": true,
176 176 "items": {"type": "string"}
177 177 },
178 178 "outputs": {
179 "description": "Outputs of cell, to be defined.",
179 "description": "Execution, display, or stream outputs.",
180 180 "type": "array",
181 181 "required": true,
182 "items": [
183 {"$ref": "/definitions/pyout_output"}
184 {"$ref": "/definitions/display_data_output"}
185 {"$ref": "/definitions/stream_output"}
186 ]
182 "items": {
183 "type": [
184 {"$ref": "/definitions/pyout_output"},
185 {"$ref": "/definitions/display_data_output"},
186 {"$ref": "/definitions/stream_output"}
187 ]
188 }
187 189 },
188 190 "collapsed": {
189 191 "description": "Whether the cell is collapsed/expanded.",
190 192 "type": "boolean",
191 193 "required": true
192 194 },
193 195 "autoscroll": {
194 196 "description": "Whether the cell's output should autoscroll.",
195 197 "type": "boolean",
196 198 "required": true
197 199 },
198 200 "prompt_number": {
199 201 "description": "The code cell's prompt number. Will be null if the cell has not been run.",
200 202 "type": ["integer", "null"],
201 203 "required": true,
202 204 "minimum": 0
203 205 }
204 206 }
205 207 },
206 208
207 209 "pyout_output": {
208 210 "description": "Result of executing a code cell.",
209 211 "type": "object",
212 "additionalProperties": false,
210 213 "properties": {
211 214 "output_type": {
212 215 "description": "Type of cell output.",
213 216 "enum": ["pyout"],
214 217 "required": true
215 218 },
216 219 "metadata": {
217 220 "description": "Cell output metadata.",
218 221 "type": "object",
219 222 "required": true,
220 223 "additionalProperties": true
221 224 },
222 225 "prompt_number": {
223 226 "description": "The code cell's prompt number. Will be null if the cell has not been run.",
224 227 "type": ["integer", "null"],
225 228 "required": true,
226 229 "minimum": 0
227 }
230 },
228 231 "text": {
229 232 "description": "The cell's text output, represented as an array of strings.",
230 233 "type": "array",
231 234 "required": false,
232 235 "items": {"type": "string"}
233 236 },
234 237 "html": {
235 238 "description": "The cell's html output, represented as an array of strings.",
236 239 "type": "array",
237 240 "required": false,
238 241 "items": {"type": "string"}
239 242 },
240 243 "png": {
241 244 "description": "The cell's png output.",
242 245 "type": "string",
243 "required": false,
246 "required": false
244 247 }
245 248 }
246 249 },
247 250
248 251 "display_data_output": {
249 252 "description": "Display data output from a code cell.",
250 253 "type": "object",
254 "additionalProperties": false,
251 255 "properties": {
252 256 "output_type": {
253 257 "description": "Type of cell output.",
254 258 "enum": ["display_data"],
255 259 "required": true
256 260 },
257 261 "metadata": {
258 262 "description": "Cell output metadata.",
259 263 "type": "object",
260 264 "required": true,
261 265 "additionalProperties": true
262 266 },
263 267 "text": {
264 268 "description": "The display data text output, represented as an array of strings.",
265 269 "type": "array",
266 270 "required": false,
267 271 "items": {"type": "string"}
268 272 },
269 273 "javascript": {
270 274 "description": "The cell's javascript output, represented as an array of strings.",
271 275 "type": "array",
272 276 "required": false,
273 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 287 "stream_output": {
279 288 "description": "Stream output from a code cell.",
280 289 "type": "object",
290 "additionalProperties": false,
281 291 "properties": {
282 292 "output_type": {
283 293 "description": "Type of cell output.",
284 294 "enum": ["stream"],
285 295 "required": true
286 296 },
287 297 "metadata": {
288 298 "description": "Cell output metadata.",
289 299 "type": "object",
290 300 "required": true,
291 301 "additionalProperties": true
292 302 },
293 303 "stream": {
294 304 "description": "The stream type/destination.",
295 305 "type": "string",
296 306 "required": true
297 307 },
298 308 "text": {
299 309 "description": "The stream's text output, represented as an array of strings.",
300 310 "type": "array",
301 311 "required": false,
302 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