##// END OF EJS Templates
use ask_exit payload in terminal console...
use ask_exit payload in terminal console avoid special frontend handling for ‘exit’ We really need to totally reconstruct how kernel shutdown works in the console interfaces, but at least this makes it behave as intended currently.

File last commit:

r16433:a7e1f7b6
r17325:bfaa365b
Show More
v3.withref.json
178 lines | 5.0 KiB | application/json | JsonLexer
Matthias BUSSONNIER
create a ipynbv3 json schema and a validator...
r8519 {
"description": "custom json structure with references to generate notebook schema",
"notebook":{
"type": "object",
"description": "notebook v3.0 root schema",
"$schema": "http://json-schema.org/draft-03/schema",
"id": "#notebook",
"required": true,
"additionalProperties": false,
"properties":{
"metadata": {
"type": "object",
"id": "metadata",
"required": true,
"description": "the metadata atribute can contain any additionnal information",
"additionalProperties": true,
"properties":{
"name": {
"id": "name",
"description": "the title of the notebook",
"type": "string",
"id": "name",
"required": true
}
}
},
"nbformat_minor": {
"description": "Notebook format, minor number. Incremented for slight variation of notebook format.",
Matthias BUSSONNIER
number -> integer
r8522 "type": "integer",
Matthias BUSSONNIER
limit cell_level and nbformat(minor) values
r8523 "minimum": 0,
Matthias BUSSONNIER
create a ipynbv3 json schema and a validator...
r8519 "id": "nbformat_minor",
"required": true
},
"nbformat": {
"description": "Notebook format, major number. Incremented between backward incompatible change is introduced.",
Matthias BUSSONNIER
number -> integer
r8522 "type": "integer",
Matthias BUSSONNIER
limit cell_level and nbformat(minor) values
r8523 "minimum": 3,
Matthias BUSSONNIER
create a ipynbv3 json schema and a validator...
r8519 "id": "nbformat",
"required": true
},
Jessica B. Hamrick
Include orig_nbformat in v3 json schema
r16432 "orig_nbformat": {
"description": "Original notebook format, major number.",
"type": "integer",
"minimum": 1,
"id": "orig_nbformat",
"required": false
},
Matthias BUSSONNIER
create a ipynbv3 json schema and a validator...
r8519 "worksheets": {
"description": "Array of worksheet, not used by the current implementation of ipython yet",
"type": "array",
"id": "worksheets",
"required": true,
"items": {"$ref": "/worksheet"}
}
}
},
"worksheet": {
"additionalProperties": false,
"properties":{
"cells": {
"type": "array",
"$schema": "http://json-schema.org/draft-03/schema",
"description": "array of cells of the current worksheet",
"id": "#cells",
"required": true,
"items": {"$ref": "/any_cell"}
},
"metadata": {
"type": "object",
"description": "metadata of the current worksheet",
"id": "metadata",
Jessica B. Hamrick
Make metadata fields be optional
r16433 "required": false
Matthias BUSSONNIER
create a ipynbv3 json schema and a validator...
r8519 }
}
},
"text_cell": {
"type": "object",
"description": "scheme for text cel and childrenm (level only optionnal argument for HEader cell)",
"$schema": "http://json-schema.org/draft-03/schema",
"id": "#cell",
"required": true,
"additionalProperties": false,
"properties":{
"cell_type": {
"type": "string",
"id": "cell_type",
"required": true
},
"level": {
Matthias BUSSONNIER
limit cell_level and nbformat(minor) values
r8523 "type": "integer",
"minimum": 1,
"maximum": 6,
Matthias BUSSONNIER
create a ipynbv3 json schema and a validator...
r8519 "id": "level",
"required": false
},
"metadata": {
"type": "object",
"id": "metadata",
Jessica B. Hamrick
Make metadata fields be optional
r16433 "required": false
Matthias BUSSONNIER
create a ipynbv3 json schema and a validator...
r8519 },
"source": {
"description": "for code cell, the source code",
Jessica B. Hamrick
Update nbformat v3 json schema so example notebooks pass
r16340 "type": ["array", "string"],
Matthias BUSSONNIER
create a ipynbv3 json schema and a validator...
r8519 "id": "source",
"required": true,
"items":
{
"type": "string",
"description": "each item represent one line of the source code written, terminated by \n",
"id": "0",
"required": true
}
}
}
},
"any_cell": {
"description": "Meta cell type that match any cell type",
"type": [{"$ref": "/text_cell"},{"$ref":"/code_cell"}],
"$schema": "http://json-schema.org/draft-03/schema"
},
"code_cell":{
"type": "object",
"$schema": "http://json-schema.org/draft-03/schema",
"description": "Cell used to execute code",
"id": "#cell",
"required": true,
"additionalProperties": false,
"properties":{
"cell_type": {
"type": "string",
"id": "cell_type",
"required": true
},
"metadata": {
"type": "object",
"id": "metadata",
Jessica B. Hamrick
Make metadata fields be optional
r16433 "required": false
Matthias BUSSONNIER
create a ipynbv3 json schema and a validator...
r8519 },
"collapsed": {
"type": "boolean",
"required": true
},
"input": {
"description": "user input for text cells",
Jessica B. Hamrick
Update nbformat v3 json schema so example notebooks pass
r16340 "type": ["array", "string"],
Matthias BUSSONNIER
create a ipynbv3 json schema and a validator...
r8519 "id": "input",
"required": true,
"items":
{
"type": "string",
"id": "input",
"required": true
}
},
"outputs": {
"description": "output for code cell, to be definied",
"required": true,
"type": "array"
},
"prompt_number": {
Matthias BUSSONNIER
prompt_number : number -> integer
r8521 "type": ["integer","null"],
Jessica B. Hamrick
Update nbformat v3 json schema so example notebooks pass
r16340 "required": false,
Matthias BUSSONNIER
create a ipynbv3 json schema and a validator...
r8519 "minimum": 0
},
"language": {
"type": "string",
"required": true
}
}
}
}