##// END OF EJS Templates
Add kernel info to top-level notebook metadata in some form
Add kernel info to top-level notebook metadata in some form

File last commit:

r16879:f31b8b0b
r16879:f31b8b0b
Show More
v4.withref.json
152 lines | 5.0 KiB | application/json | JsonLexer
{
"description": "custom json structure with references to generate notebook schema",
"notebook": {
"type": "object",
"description": "notebook v4.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": {
"language": {
"type": "string",
"required": true
},
"kernel_info": {
"type": "object",
"required": true,
"description": "kernel information, to be determined"
}
}
},
"nbformat_minor": {
"description": "Notebook format, minor number. Incremented for slight variation of notebook format.",
"type": "integer",
"minimum": 0,
"id": "nbformat_minor",
"required": true
},
"nbformat": {
"description": "Notebook format, major number. Incremented between backward incompatible change is introduced.",
"type": "integer",
"minimum": 4,
"id": "nbformat",
"required": true
},
"orig_nbformat": {
"description": "Original notebook format, major number.",
"type": "integer",
"minimum": 1,
"id": "orig_nbformat",
"required": false
},
"cells": {
"$schema": "http://json-schema.org/draft-03/schema",
"description": "array of cells of the current worksheet",
"type": "array",
"id": "#cells",
"required": true,
"items": {"$ref": "/any_cell"}
}
}
},
"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": {
"type": "integer",
"minimum": 1,
"maximum": 6,
"id": "level",
"required": false
},
"metadata": {
"type": "object",
"id": "metadata",
"required": false
},
"source": {
"description": "source text of the cell",
"type": "array",
"id": "source",
"required": true,
"items": {
"type": "string",
"description": "each item represents one line of cell, terminated by \n",
"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",
"required": false
},
"collapsed": {
"type": "boolean",
"required": true
},
"source": {
"description": "for code cell source code",
"type": "array",
"id": "source",
"required": true,
"items": {
"type": "string",
"description": "each item represents one line of the source code written, terminated by \n",
"required": true
}
}
"outputs": {
"description": "output for code cell, to be definied",
"required": true,
"type": "array"
},
"prompt_number": {
"type": ["integer", "null"],
"required": false,
"minimum": 0
}
}
}
}