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