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