##// END OF EJS Templates
Make metadata fields be optional
Jessica B. Hamrick -
Show More
@@ -1,178 +1,178 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 "minimum": 0,
31 "id": "nbformat_minor",
31 "id": "nbformat_minor",
32 "required": true
32 "required": true
33 },
33 },
34 "nbformat": {
34 "nbformat": {
35 "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.",
36 "type": "integer",
36 "type": "integer",
37 "minimum": 3,
37 "minimum": 3,
38 "id": "nbformat",
38 "id": "nbformat",
39 "required": true
39 "required": true
40 },
40 },
41 "orig_nbformat": {
41 "orig_nbformat": {
42 "description": "Original notebook format, major number.",
42 "description": "Original notebook format, major number.",
43 "type": "integer",
43 "type": "integer",
44 "minimum": 1,
44 "minimum": 1,
45 "id": "orig_nbformat",
45 "id": "orig_nbformat",
46 "required": false
46 "required": false
47 },
47 },
48 "worksheets": {
48 "worksheets": {
49 "description": "Array of worksheet, not used by the current implementation of ipython yet",
49 "description": "Array of worksheet, not used by the current implementation of ipython yet",
50 "type": "array",
50 "type": "array",
51 "id": "worksheets",
51 "id": "worksheets",
52 "required": true,
52 "required": true,
53 "items": {"$ref": "/worksheet"}
53 "items": {"$ref": "/worksheet"}
54 }
54 }
55 }
55 }
56 },
56 },
57
57
58 "worksheet": {
58 "worksheet": {
59 "additionalProperties": false,
59 "additionalProperties": false,
60 "properties":{
60 "properties":{
61 "cells": {
61 "cells": {
62 "type": "array",
62 "type": "array",
63 "$schema": "http://json-schema.org/draft-03/schema",
63 "$schema": "http://json-schema.org/draft-03/schema",
64 "description": "array of cells of the current worksheet",
64 "description": "array of cells of the current worksheet",
65 "id": "#cells",
65 "id": "#cells",
66 "required": true,
66 "required": true,
67 "items": {"$ref": "/any_cell"}
67 "items": {"$ref": "/any_cell"}
68
68
69 },
69 },
70 "metadata": {
70 "metadata": {
71 "type": "object",
71 "type": "object",
72 "description": "metadata of the current worksheet",
72 "description": "metadata of the current worksheet",
73 "id": "metadata",
73 "id": "metadata",
74 "required": true
74 "required": false
75 }
75 }
76 }
76 }
77 },
77 },
78
78
79 "text_cell": {
79 "text_cell": {
80 "type": "object",
80 "type": "object",
81 "description": "scheme for text cel and childrenm (level only optionnal argument for HEader cell)",
81 "description": "scheme for text cel and childrenm (level only optionnal argument for HEader cell)",
82 "$schema": "http://json-schema.org/draft-03/schema",
82 "$schema": "http://json-schema.org/draft-03/schema",
83 "id": "#cell",
83 "id": "#cell",
84 "required": true,
84 "required": true,
85 "additionalProperties": false,
85 "additionalProperties": false,
86 "properties":{
86 "properties":{
87 "cell_type": {
87 "cell_type": {
88 "type": "string",
88 "type": "string",
89 "id": "cell_type",
89 "id": "cell_type",
90 "required": true
90 "required": true
91 },
91 },
92 "level": {
92 "level": {
93 "type": "integer",
93 "type": "integer",
94 "minimum": 1,
94 "minimum": 1,
95 "maximum": 6,
95 "maximum": 6,
96 "id": "level",
96 "id": "level",
97 "required": false
97 "required": false
98 },
98 },
99 "metadata": {
99 "metadata": {
100 "type": "object",
100 "type": "object",
101 "id": "metadata",
101 "id": "metadata",
102 "required": true
102 "required": false
103 },
103 },
104 "source": {
104 "source": {
105 "description": "for code cell, the source code",
105 "description": "for code cell, the source code",
106 "type": ["array", "string"],
106 "type": ["array", "string"],
107 "id": "source",
107 "id": "source",
108 "required": true,
108 "required": true,
109 "items":
109 "items":
110 {
110 {
111 "type": "string",
111 "type": "string",
112 "description": "each item represent one line of the source code written, terminated by \n",
112 "description": "each item represent one line of the source code written, terminated by \n",
113 "id": "0",
113 "id": "0",
114 "required": true
114 "required": true
115 }
115 }
116 }
116 }
117 }
117 }
118
118
119 },
119 },
120
120
121 "any_cell": {
121 "any_cell": {
122 "description": "Meta cell type that match any cell type",
122 "description": "Meta cell type that match any cell type",
123 "type": [{"$ref": "/text_cell"},{"$ref":"/code_cell"}],
123 "type": [{"$ref": "/text_cell"},{"$ref":"/code_cell"}],
124 "$schema": "http://json-schema.org/draft-03/schema"
124 "$schema": "http://json-schema.org/draft-03/schema"
125 },
125 },
126
126
127 "code_cell":{
127 "code_cell":{
128 "type": "object",
128 "type": "object",
129 "$schema": "http://json-schema.org/draft-03/schema",
129 "$schema": "http://json-schema.org/draft-03/schema",
130 "description": "Cell used to execute code",
130 "description": "Cell used to execute code",
131 "id": "#cell",
131 "id": "#cell",
132 "required": true,
132 "required": true,
133 "additionalProperties": false,
133 "additionalProperties": false,
134 "properties":{
134 "properties":{
135 "cell_type": {
135 "cell_type": {
136 "type": "string",
136 "type": "string",
137 "id": "cell_type",
137 "id": "cell_type",
138 "required": true
138 "required": true
139 },
139 },
140 "metadata": {
140 "metadata": {
141 "type": "object",
141 "type": "object",
142 "id": "metadata",
142 "id": "metadata",
143 "required": true
143 "required": false
144 },
144 },
145 "collapsed": {
145 "collapsed": {
146 "type": "boolean",
146 "type": "boolean",
147 "required": true
147 "required": true
148 },
148 },
149 "input": {
149 "input": {
150 "description": "user input for text cells",
150 "description": "user input for text cells",
151 "type": ["array", "string"],
151 "type": ["array", "string"],
152 "id": "input",
152 "id": "input",
153 "required": true,
153 "required": true,
154 "items":
154 "items":
155 {
155 {
156 "type": "string",
156 "type": "string",
157 "id": "input",
157 "id": "input",
158 "required": true
158 "required": true
159 }
159 }
160 },
160 },
161 "outputs": {
161 "outputs": {
162 "description": "output for code cell, to be definied",
162 "description": "output for code cell, to be definied",
163 "required": true,
163 "required": true,
164 "type": "array"
164 "type": "array"
165 },
165 },
166 "prompt_number": {
166 "prompt_number": {
167 "type": ["integer","null"],
167 "type": ["integer","null"],
168 "required": false,
168 "required": false,
169 "minimum": 0
169 "minimum": 0
170 },
170 },
171 "language": {
171 "language": {
172 "type": "string",
172 "type": "string",
173 "required": true
173 "required": true
174 }
174 }
175 }
175 }
176
176
177 }
177 }
178 }
178 }
General Comments 0
You need to be logged in to leave comments. Login now