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