Show More
@@ -1,166 +1,170 b'' | |||
|
1 | 1 | { |
|
2 | 2 | "description": "custom json structure with references to generate notebook schema", |
|
3 | 3 | "notebook":{ |
|
4 | 4 | "type": "object", |
|
5 | 5 | "description": "notebook v3.0 root schema", |
|
6 | 6 | "$schema": "http://json-schema.org/draft-03/schema", |
|
7 | 7 | "id": "#notebook", |
|
8 | 8 | "required": true, |
|
9 | 9 | "additionalProperties": false, |
|
10 | 10 | "properties":{ |
|
11 | 11 | "metadata": { |
|
12 | 12 | "type": "object", |
|
13 | 13 | "id": "metadata", |
|
14 | 14 | "required": true, |
|
15 | 15 | "description": "the metadata atribute can contain any additionnal information", |
|
16 | 16 | "additionalProperties": true, |
|
17 | 17 | "properties":{ |
|
18 | 18 | "name": { |
|
19 | 19 | "id": "name", |
|
20 | 20 | "description": "the title of the notebook", |
|
21 | 21 | "type": "string", |
|
22 | 22 | "id": "name", |
|
23 | 23 | "required": true |
|
24 | 24 | } |
|
25 | 25 | } |
|
26 | 26 | }, |
|
27 | 27 | "nbformat_minor": { |
|
28 | 28 | "description": "Notebook format, minor number. Incremented for slight variation of notebook format.", |
|
29 | 29 | "type": "integer", |
|
30 | "minimum": 0, | |
|
30 | 31 | "id": "nbformat_minor", |
|
31 | 32 | "required": true |
|
32 | 33 | }, |
|
33 | 34 | "nbformat": { |
|
34 | 35 | "description": "Notebook format, major number. Incremented between backward incompatible change is introduced.", |
|
35 | 36 | "type": "integer", |
|
37 | "minimum": 3, | |
|
36 | 38 | "id": "nbformat", |
|
37 | 39 | "required": true |
|
38 | 40 | }, |
|
39 | 41 | "worksheets": { |
|
40 | 42 | "description": "Array of worksheet, not used by the current implementation of ipython yet", |
|
41 | 43 | "type": "array", |
|
42 | 44 | "id": "worksheets", |
|
43 | 45 | "required": true, |
|
44 | 46 | "items": {"$ref": "/worksheet"} |
|
45 | 47 | } |
|
46 | 48 | } |
|
47 | 49 | }, |
|
48 | 50 | |
|
49 | 51 | "worksheet": { |
|
50 | 52 | "additionalProperties": false, |
|
51 | 53 | "properties":{ |
|
52 | 54 | "cells": { |
|
53 | 55 | "type": "array", |
|
54 | 56 | "$schema": "http://json-schema.org/draft-03/schema", |
|
55 | 57 | "description": "array of cells of the current worksheet", |
|
56 | 58 | "id": "#cells", |
|
57 | 59 | "required": true, |
|
58 | 60 | "items": {"$ref": "/any_cell"} |
|
59 | 61 | |
|
60 | 62 | }, |
|
61 | 63 | "metadata": { |
|
62 | 64 | "type": "object", |
|
63 | 65 | "description": "metadata of the current worksheet", |
|
64 | 66 | "id": "metadata", |
|
65 | 67 | "required": true |
|
66 | 68 | } |
|
67 | 69 | } |
|
68 | 70 | }, |
|
69 | 71 | |
|
70 | 72 | "text_cell": { |
|
71 | 73 | "type": "object", |
|
72 | 74 | "description": "scheme for text cel and childrenm (level only optionnal argument for HEader cell)", |
|
73 | 75 | "$schema": "http://json-schema.org/draft-03/schema", |
|
74 | 76 | "id": "#cell", |
|
75 | 77 | "required": true, |
|
76 | 78 | "additionalProperties": false, |
|
77 | 79 | "properties":{ |
|
78 | 80 | "cell_type": { |
|
79 | 81 | "type": "string", |
|
80 | 82 | "id": "cell_type", |
|
81 | 83 | "required": true |
|
82 | 84 | }, |
|
83 | 85 | "level": { |
|
84 |
"type": " |
|
|
86 | "type": "integer", | |
|
87 | "minimum": 1, | |
|
88 | "maximum": 6, | |
|
85 | 89 | "id": "level", |
|
86 | 90 | "required": false |
|
87 | 91 | }, |
|
88 | 92 | "metadata": { |
|
89 | 93 | "type": "object", |
|
90 | 94 | "id": "metadata", |
|
91 | 95 | "required": true |
|
92 | 96 | }, |
|
93 | 97 | "source": { |
|
94 | 98 | "description": "for code cell, the source code", |
|
95 | 99 | "type": "array", |
|
96 | 100 | "id": "source", |
|
97 | 101 | "required": true, |
|
98 | 102 | "items": |
|
99 | 103 | { |
|
100 | 104 | "type": "string", |
|
101 | 105 | "description": "each item represent one line of the source code written, terminated by \n", |
|
102 | 106 | "id": "0", |
|
103 | 107 | "required": true |
|
104 | 108 | } |
|
105 | 109 | } |
|
106 | 110 | } |
|
107 | 111 | |
|
108 | 112 | }, |
|
109 | 113 | |
|
110 | 114 | "any_cell": { |
|
111 | 115 | "description": "Meta cell type that match any cell type", |
|
112 | 116 | "type": [{"$ref": "/text_cell"},{"$ref":"/code_cell"}], |
|
113 | 117 | "$schema": "http://json-schema.org/draft-03/schema" |
|
114 | 118 | }, |
|
115 | 119 | |
|
116 | 120 | "code_cell":{ |
|
117 | 121 | "type": "object", |
|
118 | 122 | "$schema": "http://json-schema.org/draft-03/schema", |
|
119 | 123 | "description": "Cell used to execute code", |
|
120 | 124 | "id": "#cell", |
|
121 | 125 | "required": true, |
|
122 | 126 | "additionalProperties": false, |
|
123 | 127 | "properties":{ |
|
124 | 128 | "cell_type": { |
|
125 | 129 | "type": "string", |
|
126 | 130 | "id": "cell_type", |
|
127 | 131 | "required": true |
|
128 | 132 | }, |
|
129 | 133 | "metadata": { |
|
130 | 134 | "type": "object", |
|
131 | 135 | "id": "metadata", |
|
132 | 136 | "required": true |
|
133 | 137 | }, |
|
134 | 138 | "collapsed": { |
|
135 | 139 | "type": "boolean", |
|
136 | 140 | "required": true |
|
137 | 141 | }, |
|
138 | 142 | "input": { |
|
139 | 143 | "description": "user input for text cells", |
|
140 | 144 | "type": "array", |
|
141 | 145 | "id": "input", |
|
142 | 146 | "required": true, |
|
143 | 147 | "items": |
|
144 | 148 | { |
|
145 | 149 | "type": "string", |
|
146 | 150 | "id": "input", |
|
147 | 151 | "required": true |
|
148 | 152 | } |
|
149 | 153 | }, |
|
150 | 154 | "outputs": { |
|
151 | 155 | "description": "output for code cell, to be definied", |
|
152 | 156 | "required": true, |
|
153 | 157 | "type": "array" |
|
154 | 158 | }, |
|
155 | 159 | "prompt_number": { |
|
156 | 160 | "type": ["integer","null"], |
|
157 | 161 | "minimum": 0 |
|
158 | 162 | }, |
|
159 | 163 | "language": { |
|
160 | 164 | "type": "string", |
|
161 | 165 | "required": true |
|
162 | 166 | } |
|
163 | 167 | } |
|
164 | 168 | |
|
165 | 169 | } |
|
166 | 170 | } |
General Comments 0
You need to be logged in to leave comments.
Login now