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