v4.withref.json
308 lines
| 11.3 KiB
| application/json
|
JsonLexer
Jessica B. Hamrick
|
r16871 | { | ||
Jessica B. Hamrick
|
r16882 | "$schema": "http://json-schema.org/draft-03/schema#", | ||
"description": "IPython Notebook v4.0 JSON schema.", | ||||
"type": "object", | ||||
"additionalProperties": false, | ||||
"properties": { | ||||
"metadata": { | ||||
"description": "Notebook root-level metadata.", | ||||
"type": "object", | ||||
"required": true, | ||||
"additionalProperties": true, | ||||
"properties": { | ||||
"language": { | ||||
"description": "Language of the notebook's kernel.", | ||||
"type": "string", | ||||
"required": true | ||||
}, | ||||
"kernel_info": { | ||||
Jessica B. Hamrick
|
r16884 | "description": "Other kernel information, to be determined.", | ||
Jessica B. Hamrick
|
r16882 | "type": "object", | ||
"required": true, | ||||
"additionalProperties": true | ||||
Jessica B. Hamrick
|
r16885 | }, | ||
"signature": { | ||||
Jessica B. Hamrick
|
r16896 | "description": "Hash of the notebook.", | ||
Jessica B. Hamrick
|
r16885 | "type": "string", | ||
Jessica B. Hamrick
|
r16896 | "required": false | ||
Jessica B. Hamrick
|
r16878 | } | ||
Jessica B. Hamrick
|
r16882 | } | ||
}, | ||||
"nbformat_minor": { | ||||
"description": "Notebook format (minor number). Incremented for slight changes to the notebook format.", | ||||
"type": "integer", | ||||
"required": true, | ||||
"minimum": 0 | ||||
}, | ||||
"nbformat": { | ||||
"description": "Notebook format (major number). Incremented between backwards incompatible changes to the notebook format.", | ||||
"type": "integer", | ||||
"required": true, | ||||
Jessica B. Hamrick
|
r16898 | "minimum": 4, | ||
"maximum": 4 | ||||
Jessica B. Hamrick
|
r16882 | }, | ||
"orig_nbformat": { | ||||
"description": "Original notebook format (major number) before converting the notebook between versions.", | ||||
"type": "integer", | ||||
"required": false, | ||||
"minimum": 1 | ||||
}, | ||||
"cells": { | ||||
Jessica B. Hamrick
|
r16883 | "description": "Array of cells of the current notebook.", | ||
Jessica B. Hamrick
|
r16882 | "type": "array", | ||
"required": true, | ||||
"items": { | ||||
"type": [ | ||||
Jessica B. Hamrick
|
r16887 | {"$ref": "/definitions/raw_cell"}, | ||
{"$ref": "/definitions/markdown_cell"}, | ||||
{"$ref": "/definitions/heading_cell"}, | ||||
{"$ref": "/definitions/code_cell"} | ||||
Jessica B. Hamrick
|
r16882 | ] | ||
Jessica B. Hamrick
|
r16871 | } | ||
} | ||||
}, | ||||
Jessica B. Hamrick
|
r16882 | "definitions": { | ||
Jessica B. Hamrick
|
r16886 | "raw_cell": { | ||
"description": "Notebook raw nbconvert cell.", | ||||
Jessica B. Hamrick
|
r16882 | "type": "object", | ||
"additionalProperties": false, | ||||
"properties": { | ||||
"cell_type": { | ||||
Jessica B. Hamrick
|
r16883 | "description": "String identifying the type of cell.", | ||
Jessica B. Hamrick
|
r16886 | "enum": ["raw"], | ||
"required": true | ||||
}, | ||||
"metadata": { | ||||
"description": "Cell-level metadata.", | ||||
"type": "object", | ||||
"required": true, | ||||
"additionalProperties": true, | ||||
"properties": { | ||||
"format": { | ||||
Jessica B. Hamrick
|
r16897 | "description": "Raw cell metadata format for nbconvert.", | ||
Jessica B. Hamrick
|
r16886 | "type": "string", | ||
"required": false | ||||
} | ||||
} | ||||
}, | ||||
"source": { | ||||
"description": "Contents of the cell, represented as an array of lines.", | ||||
"type": "array", | ||||
"required": true, | ||||
"items": {"type": "string"} | ||||
} | ||||
} | ||||
}, | ||||
"markdown_cell": { | ||||
"description": "Notebook markdown cell.", | ||||
"type": "object", | ||||
"additionalProperties": false, | ||||
"properties": { | ||||
"cell_type": { | ||||
"description": "String identifying the type of cell.", | ||||
"enum": ["markdown"], | ||||
Jessica B. Hamrick
|
r16874 | "required": true | ||
Jessica B. Hamrick
|
r16882 | }, | ||
"metadata": { | ||||
Jessica B. Hamrick
|
r16883 | "description": "Cell-level metadata.", | ||
Jessica B. Hamrick
|
r16882 | "type": "object", | ||
"required": true, | ||||
"additionalProperties": true | ||||
}, | ||||
"source": { | ||||
Jessica B. Hamrick
|
r16886 | "description": "Contents of the cell, represented as an array of lines.", | ||
Jessica B. Hamrick
|
r16882 | "type": "array", | ||
"required": true, | ||||
Jessica B. Hamrick
|
r16886 | "items": {"type": "string"} | ||
Jessica B. Hamrick
|
r16874 | } | ||
Jessica B. Hamrick
|
r16871 | } | ||
Jessica B. Hamrick
|
r16882 | }, | ||
Jessica B. Hamrick
|
r16871 | |||
Jessica B. Hamrick
|
r16882 | "heading_cell": { | ||
Jessica B. Hamrick
|
r16883 | "description": "Notebook heading cell.", | ||
Jessica B. Hamrick
|
r16882 | "type": "object", | ||
"additionalProperties": false, | ||||
"properties": { | ||||
"cell_type": { | ||||
Jessica B. Hamrick
|
r16883 | "description": "String identifying the type of cell.", | ||
Jessica B. Hamrick
|
r16882 | "enum": ["heading"], | ||
Jessica B. Hamrick
|
r16874 | "required": true | ||
Jessica B. Hamrick
|
r16882 | }, | ||
"metadata": { | ||||
Jessica B. Hamrick
|
r16883 | "description": "Cell-level metadata.", | ||
Jessica B. Hamrick
|
r16882 | "type": "object", | ||
"required": true, | ||||
"additionalProperties": true | ||||
}, | ||||
"source": { | ||||
Jessica B. Hamrick
|
r16886 | "description": "Contents of the cell, represented as an array of lines.", | ||
Jessica B. Hamrick
|
r16882 | "type": "array", | ||
"required": true, | ||||
Jessica B. Hamrick
|
r16886 | "items": {"type": "string"} | ||
Jessica B. Hamrick
|
r16882 | }, | ||
"level": { | ||||
Jessica B. Hamrick
|
r16883 | "description": "Level of heading cells.", | ||
Jessica B. Hamrick
|
r16882 | "type": "integer", | ||
Jessica B. Hamrick
|
r16883 | "required": true, | ||
Jessica B. Hamrick
|
r16882 | "minimum": 1, | ||
"maximum": 6 | ||||
Jessica B. Hamrick
|
r16874 | } | ||
Jessica B. Hamrick
|
r16876 | } | ||
Jessica B. Hamrick
|
r16882 | }, | ||
"code_cell": { | ||||
Jessica B. Hamrick
|
r16883 | "description": "Notebook code cell.", | ||
Jessica B. Hamrick
|
r16882 | "type": "object", | ||
"additionalProperties": false, | ||||
"properties": { | ||||
"cell_type": { | ||||
Jessica B. Hamrick
|
r16883 | "description": "String identifying the type of cell.", | ||
Jessica B. Hamrick
|
r16882 | "enum": ["code"], | ||
"required": true | ||||
}, | ||||
"metadata": { | ||||
Jessica B. Hamrick
|
r16883 | "description": "Cell-level metadata.", | ||
Jessica B. Hamrick
|
r16882 | "type": "object", | ||
"required": true, | ||||
Jessica B. Hamrick
|
r16894 | "additionalProperties": true, | ||
"properties": { | ||||
"collapsed": { | ||||
"description": "Whether the cell is collapsed/expanded.", | ||||
"type": "boolean", | ||||
"required": true | ||||
}, | ||||
"autoscroll": { | ||||
"description": "Whether the cell's output should autoscroll.", | ||||
"type": "boolean", | ||||
"required": true | ||||
} | ||||
} | ||||
Jessica B. Hamrick
|
r16882 | }, | ||
"source": { | ||||
Jessica B. Hamrick
|
r16886 | "description": "Contents of the cell, represented as an array of lines.", | ||
Jessica B. Hamrick
|
r16882 | "type": "array", | ||
"required": true, | ||||
Jessica B. Hamrick
|
r16886 | "items": {"type": "string"} | ||
Jessica B. Hamrick
|
r16884 | }, | ||
Jessica B. Hamrick
|
r16882 | "outputs": { | ||
Jessica B. Hamrick
|
r16890 | "description": "Execution, display, or stream outputs.", | ||
Jessica B. Hamrick
|
r16882 | "type": "array", | ||
Jessica B. Hamrick
|
r16888 | "required": true, | ||
Jessica B. Hamrick
|
r16890 | "items": { | ||
"type": [ | ||||
Jessica B. Hamrick
|
r16891 | {"$ref": "/definitions/execute_output"}, | ||
Jessica B. Hamrick
|
r16892 | {"$ref": "/definitions/stream_output"}, | ||
{"$ref": "/definitions/error_output"} | ||||
Jessica B. Hamrick
|
r16890 | ] | ||
} | ||||
Jessica B. Hamrick
|
r16882 | }, | ||
"prompt_number": { | ||||
Jessica B. Hamrick
|
r16883 | "description": "The code cell's prompt number. Will be null if the cell has not been run.", | ||
Jessica B. Hamrick
|
r16882 | "type": ["integer", "null"], | ||
"required": true, | ||||
"minimum": 0 | ||||
} | ||||
Jessica B. Hamrick
|
r16871 | } | ||
Jessica B. Hamrick
|
r16888 | }, | ||
Jessica B. Hamrick
|
r16891 | "execute_output": { | ||
Jessica B. Hamrick
|
r16889 | "description": "Result of executing a code cell.", | ||
"type": "object", | ||||
Jessica B. Hamrick
|
r16890 | "additionalProperties": false, | ||
Jessica B. Hamrick
|
r16889 | "properties": { | ||
"output_type": { | ||||
"description": "Type of cell output.", | ||||
Jessica B. Hamrick
|
r16895 | "enum": ["execute_output", "display_data"], | ||
Jessica B. Hamrick
|
r16889 | "required": true | ||
}, | ||||
"metadata": { | ||||
"description": "Cell output metadata.", | ||||
"type": "object", | ||||
"required": true, | ||||
"additionalProperties": true | ||||
}, | ||||
"prompt_number": { | ||||
"description": "The code cell's prompt number. Will be null if the cell has not been run.", | ||||
"type": ["integer", "null"], | ||||
Jessica B. Hamrick
|
r16895 | "required": false, | ||
Jessica B. Hamrick
|
r16889 | "minimum": 0 | ||
Jessica B. Hamrick
|
r16899 | } | ||
}, | ||||
"patternProperties": { | ||||
"^[a-zA-Z0-9+-].*/[a-zA-Z0-9+-].*$": { | ||||
"description": "The cell's mimetype output (e.g. text/plain), represented as either an array of strings or a string.", | ||||
"type": ["string", "array"], | ||||
Jessica B. Hamrick
|
r16890 | "required": false | ||
} | ||||
Jessica B. Hamrick
|
r16889 | } | ||
Jessica B. Hamrick
|
r16888 | }, | ||
"stream_output": { | ||||
Jessica B. Hamrick
|
r16889 | "description": "Stream output from a code cell.", | ||
"type": "object", | ||||
Jessica B. Hamrick
|
r16890 | "additionalProperties": false, | ||
Jessica B. Hamrick
|
r16889 | "properties": { | ||
"output_type": { | ||||
"description": "Type of cell output.", | ||||
"enum": ["stream"], | ||||
"required": true | ||||
}, | ||||
"metadata": { | ||||
"description": "Cell output metadata.", | ||||
"type": "object", | ||||
"required": true, | ||||
"additionalProperties": true | ||||
}, | ||||
"stream": { | ||||
"description": "The stream type/destination.", | ||||
"type": "string", | ||||
"required": true | ||||
}, | ||||
Jessica B. Hamrick
|
r16899 | "text/plain": { | ||
Jessica B. Hamrick
|
r16889 | "description": "The stream's text output, represented as an array of strings.", | ||
"type": "array", | ||||
"required": false, | ||||
"items": {"type": "string"} | ||||
} | ||||
} | ||||
Jessica B. Hamrick
|
r16892 | }, | ||
"error_output": { | ||||
"description": "Output of an error that occurred during code cell execution.", | ||||
"type": "object", | ||||
"additionalProperties": false, | ||||
"properties": { | ||||
"output_type": { | ||||
"description": "Type of cell output.", | ||||
"enum": ["error"], | ||||
"required": true | ||||
}, | ||||
"metadata": { | ||||
"description": "Cell output metadata.", | ||||
"type": "object", | ||||
"required": true, | ||||
"additionalProperties": true | ||||
}, | ||||
"ename": { | ||||
"description": "The name of the error.", | ||||
"type": "string", | ||||
"required": true | ||||
}, | ||||
"evalue": { | ||||
"description": "The value, or message, of the error.", | ||||
"type": "string", | ||||
"required": true | ||||
}, | ||||
"traceback": { | ||||
"description": "The error's traceback, represented as an array of strings.", | ||||
"type": "array", | ||||
Jessica B. Hamrick
|
r16893 | "required": true, | ||
Jessica B. Hamrick
|
r16892 | "items": {"type": "string"} | ||
} | ||||
} | ||||
Jessica B. Hamrick
|
r16871 | } | ||
} | ||||
} | ||||