Show More
@@ -1,178 +1,201 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-b]{256}$" |
|
28 | "pattern": "^sha256:[0-9a-b]{256}$" | |
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/text_cell"}, |
|
56 | {"$ref": "#/definitions/text_cell"}, | |
57 | {"$ref": "#/definitions/heading_cell"}, |
|
57 | {"$ref": "#/definitions/heading_cell"}, | |
58 | {"$ref": "#/definitions/code_cell"} |
|
58 | {"$ref": "#/definitions/code_cell"} | |
59 | ] |
|
59 | ] | |
60 | } |
|
60 | } | |
61 | } |
|
61 | } | |
62 | }, |
|
62 | }, | |
63 |
|
63 | |||
64 | "definitions": { |
|
64 | "definitions": { | |
65 |
|
65 | |||
66 |
" |
|
66 | "raw_cell": { | |
67 |
"description": "Notebook |
|
67 | "description": "Notebook raw nbconvert cell.", | |
68 | "type": "object", |
|
68 | "type": "object", | |
69 | "additionalProperties": false, |
|
69 | "additionalProperties": false, | |
70 | "properties": { |
|
70 | "properties": { | |
71 | "cell_type": { |
|
71 | "cell_type": { | |
72 | "description": "String identifying the type of cell.", |
|
72 | "description": "String identifying the type of cell.", | |
73 |
"enum": [ |
|
73 | "enum": ["raw"], | |
|
74 | "required": true | |||
|
75 | }, | |||
|
76 | "metadata": { | |||
|
77 | "description": "Cell-level metadata.", | |||
|
78 | "type": "object", | |||
|
79 | "required": true, | |||
|
80 | "additionalProperties": true, | |||
|
81 | "properties": { | |||
|
82 | "format": { | |||
|
83 | "description": "Raw cell format, to be determined.", | |||
|
84 | "type": "string", | |||
|
85 | "required": false | |||
|
86 | } | |||
|
87 | } | |||
|
88 | }, | |||
|
89 | "source": { | |||
|
90 | "description": "Contents of the cell, represented as an array of lines.", | |||
|
91 | "type": "array", | |||
|
92 | "required": true, | |||
|
93 | "items": {"type": "string"} | |||
|
94 | } | |||
|
95 | } | |||
|
96 | }, | |||
|
97 | ||||
|
98 | "markdown_cell": { | |||
|
99 | "description": "Notebook markdown cell.", | |||
|
100 | "type": "object", | |||
|
101 | "additionalProperties": false, | |||
|
102 | "properties": { | |||
|
103 | "cell_type": { | |||
|
104 | "description": "String identifying the type of cell.", | |||
|
105 | "enum": ["markdown"], | |||
74 | "required": true |
|
106 | "required": true | |
75 | }, |
|
107 | }, | |
76 | "metadata": { |
|
108 | "metadata": { | |
77 | "description": "Cell-level metadata.", |
|
109 | "description": "Cell-level metadata.", | |
78 | "type": "object", |
|
110 | "type": "object", | |
79 | "required": true, |
|
111 | "required": true, | |
80 | "additionalProperties": true |
|
112 | "additionalProperties": true | |
81 | }, |
|
113 | }, | |
82 | "source": { |
|
114 | "source": { | |
83 |
"description": "Contents of the cell, represented as an array of lines |
|
115 | "description": "Contents of the cell, represented as an array of lines.", | |
84 | "type": "array", |
|
116 | "type": "array", | |
85 | "required": true, |
|
117 | "required": true, | |
86 | "items": { |
|
118 | "items": {"type": "string"} | |
87 | "type": "string", |
|
|||
88 | "pattern": "^.*\n$" |
|
|||
89 | } |
|
|||
90 | } |
|
119 | } | |
91 | } |
|
120 | } | |
92 | }, |
|
121 | }, | |
93 |
|
122 | |||
94 | "heading_cell": { |
|
123 | "heading_cell": { | |
95 | "description": "Notebook heading cell.", |
|
124 | "description": "Notebook heading cell.", | |
96 | "type": "object", |
|
125 | "type": "object", | |
97 | "additionalProperties": false, |
|
126 | "additionalProperties": false, | |
98 | "properties": { |
|
127 | "properties": { | |
99 | "cell_type": { |
|
128 | "cell_type": { | |
100 | "description": "String identifying the type of cell.", |
|
129 | "description": "String identifying the type of cell.", | |
101 | "enum": ["heading"], |
|
130 | "enum": ["heading"], | |
102 | "required": true |
|
131 | "required": true | |
103 | }, |
|
132 | }, | |
104 | "metadata": { |
|
133 | "metadata": { | |
105 | "description": "Cell-level metadata.", |
|
134 | "description": "Cell-level metadata.", | |
106 | "type": "object", |
|
135 | "type": "object", | |
107 | "required": true, |
|
136 | "required": true, | |
108 | "additionalProperties": true |
|
137 | "additionalProperties": true | |
109 | }, |
|
138 | }, | |
110 | "source": { |
|
139 | "source": { | |
111 |
"description": "Contents of the cell, represented as an array of lines |
|
140 | "description": "Contents of the cell, represented as an array of lines.", | |
112 | "type": "array", |
|
141 | "type": "array", | |
113 | "required": true, |
|
142 | "required": true, | |
114 | "items": { |
|
143 | "items": {"type": "string"} | |
115 | "type": "string", |
|
|||
116 | "pattern": "^.*\n$" |
|
|||
117 | } |
|
|||
118 | }, |
|
144 | }, | |
119 | "level": { |
|
145 | "level": { | |
120 | "description": "Level of heading cells.", |
|
146 | "description": "Level of heading cells.", | |
121 | "type": "integer", |
|
147 | "type": "integer", | |
122 | "required": true, |
|
148 | "required": true, | |
123 | "minimum": 1, |
|
149 | "minimum": 1, | |
124 | "maximum": 6 |
|
150 | "maximum": 6 | |
125 | } |
|
151 | } | |
126 | } |
|
152 | } | |
127 | }, |
|
153 | }, | |
128 |
|
154 | |||
129 | "code_cell": { |
|
155 | "code_cell": { | |
130 | "description": "Notebook code cell.", |
|
156 | "description": "Notebook code cell.", | |
131 | "type": "object", |
|
157 | "type": "object", | |
132 | "additionalProperties": false, |
|
158 | "additionalProperties": false, | |
133 | "properties": { |
|
159 | "properties": { | |
134 | "cell_type": { |
|
160 | "cell_type": { | |
135 | "description": "String identifying the type of cell.", |
|
161 | "description": "String identifying the type of cell.", | |
136 | "enum": ["code"], |
|
162 | "enum": ["code"], | |
137 | "required": true |
|
163 | "required": true | |
138 | }, |
|
164 | }, | |
139 | "metadata": { |
|
165 | "metadata": { | |
140 | "description": "Cell-level metadata.", |
|
166 | "description": "Cell-level metadata.", | |
141 | "type": "object", |
|
167 | "type": "object", | |
142 | "required": true, |
|
168 | "required": true, | |
143 | "additionalProperties": true |
|
169 | "additionalProperties": true | |
144 | }, |
|
170 | }, | |
145 | "source": { |
|
171 | "source": { | |
146 |
"description": "Contents of the cell, represented as an array of lines |
|
172 | "description": "Contents of the cell, represented as an array of lines.", | |
147 | "type": "array", |
|
173 | "type": "array", | |
148 | "required": true, |
|
174 | "required": true, | |
149 | "items": { |
|
175 | "items": {"type": "string"} | |
150 | "type": "string", |
|
|||
151 | "pattern": "^.*\n$" |
|
|||
152 | } |
|
|||
153 | }, |
|
176 | }, | |
154 | "outputs": { |
|
177 | "outputs": { | |
155 | "description": "Outputs of cell, to be defined.", |
|
178 | "description": "Outputs of cell, to be defined.", | |
156 | "type": "array", |
|
179 | "type": "array", | |
157 | "required": true |
|
180 | "required": true | |
158 | }, |
|
181 | }, | |
159 | "collapsed": { |
|
182 | "collapsed": { | |
160 | "description": "Whether the cell is collapsed/expanded.", |
|
183 | "description": "Whether the cell is collapsed/expanded.", | |
161 | "type": "boolean", |
|
184 | "type": "boolean", | |
162 | "required": true |
|
185 | "required": true | |
163 | }, |
|
186 | }, | |
164 | "autoscroll": { |
|
187 | "autoscroll": { | |
165 | "description": "Whether the cell's output should autoscroll.", |
|
188 | "description": "Whether the cell's output should autoscroll.", | |
166 | "type": "boolean", |
|
189 | "type": "boolean", | |
167 | "required": true |
|
190 | "required": true | |
168 | }, |
|
191 | }, | |
169 | "prompt_number": { |
|
192 | "prompt_number": { | |
170 | "description": "The code cell's prompt number. Will be null if the cell has not been run.", |
|
193 | "description": "The code cell's prompt number. Will be null if the cell has not been run.", | |
171 | "type": ["integer", "null"], |
|
194 | "type": ["integer", "null"], | |
172 | "required": true, |
|
195 | "required": true, | |
173 | "minimum": 0 |
|
196 | "minimum": 0 | |
174 | } |
|
197 | } | |
175 | } |
|
198 | } | |
176 | } |
|
199 | } | |
177 | } |
|
200 | } | |
178 | } |
|
201 | } |
General Comments 0
You need to be logged in to leave comments.
Login now