v4.withref.json
323 lines
| 12.7 KiB
| application/json
|
JsonLexer
Jessica B. Hamrick
|
r16871 | { | ||
Jessica B. Hamrick
|
r16909 | "$schema": "http://json-schema.org/draft-04/schema#", | ||
Jessica B. Hamrick
|
r16882 | "description": "IPython Notebook v4.0 JSON schema.", | ||
"type": "object", | ||||
"additionalProperties": false, | ||||
Jessica B. Hamrick
|
r16909 | "required": ["metadata", "nbformat_minor", "nbformat", "cells"], | ||
Jessica B. Hamrick
|
r16882 | "properties": { | ||
"metadata": { | ||||
"description": "Notebook root-level metadata.", | ||||
"type": "object", | ||||
"additionalProperties": true, | ||||
"properties": { | ||||
"kernel_info": { | ||||
Jessica B. Hamrick
|
r16903 | "description": "Kernel information.", | ||
Jessica B. Hamrick
|
r16882 | "type": "object", | ||
Jessica B. Hamrick
|
r16909 | "required": ["name", "language"], | ||
Jessica B. Hamrick
|
r16903 | "properties": { | ||
"name": { | ||||
"description": "Name of the kernel specification.", | ||||
Jessica B. Hamrick
|
r16909 | "type": "string" | ||
Jessica B. Hamrick
|
r16903 | }, | ||
"language": { | ||||
"description": "The programming language which this kernel runs.", | ||||
Jessica B. Hamrick
|
r16909 | "type": "string" | ||
Jessica B. Hamrick
|
r16903 | }, | ||
"codemirror_mode": { | ||||
"description": "The codemirror mode to use for code in this language.", | ||||
Jessica B. Hamrick
|
r16909 | "type": "string" | ||
Jessica B. Hamrick
|
r16903 | } | ||
} | ||||
Jessica B. Hamrick
|
r16885 | }, | ||
"signature": { | ||||
Jessica B. Hamrick
|
r16896 | "description": "Hash of the notebook.", | ||
Jessica B. Hamrick
|
r16909 | "type": "string" | ||
Jessica B. Hamrick
|
r16904 | }, | ||
"orig_nbformat": { | ||||
"description": "Original notebook format (major number) before converting the notebook between versions.", | ||||
"type": "integer", | ||||
"minimum": 1 | ||||
Jessica B. Hamrick
|
r16878 | } | ||
Jessica B. Hamrick
|
r16882 | } | ||
}, | ||||
"nbformat_minor": { | ||||
Jessica B. Hamrick
|
r16905 | "description": "Notebook format (minor number). Incremented for backward compatible changes to the notebook format.", | ||
Jessica B. Hamrick
|
r16882 | "type": "integer", | ||
"minimum": 0 | ||||
}, | ||||
"nbformat": { | ||||
"description": "Notebook format (major number). Incremented between backwards incompatible changes to the notebook format.", | ||||
"type": "integer", | ||||
Jessica B. Hamrick
|
r16898 | "minimum": 4, | ||
"maximum": 4 | ||||
Jessica B. Hamrick
|
r16882 | }, | ||
"cells": { | ||||
Jessica B. Hamrick
|
r16883 | "description": "Array of cells of the current notebook.", | ||
Jessica B. Hamrick
|
r16882 | "type": "array", | ||
"items": { | ||||
Jessica B. Hamrick
|
r16909 | "type": "object", | ||
"oneOf": [ | ||||
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, | ||||
Jessica B. Hamrick
|
r16909 | "required": ["cell_type", "metadata"], | ||
Jessica B. Hamrick
|
r16882 | "properties": { | ||
"cell_type": { | ||||
Jessica B. Hamrick
|
r16883 | "description": "String identifying the type of cell.", | ||
Jessica B. Hamrick
|
r16909 | "enum": ["raw"] | ||
Jessica B. Hamrick
|
r16886 | }, | ||
"metadata": { | ||||
"description": "Cell-level metadata.", | ||||
"type": "object", | ||||
"additionalProperties": true, | ||||
"properties": { | ||||
"format": { | ||||
Jessica B. Hamrick
|
r16897 | "description": "Raw cell metadata format for nbconvert.", | ||
Jessica B. Hamrick
|
r16909 | "type": "string" | ||
Jessica B. Hamrick
|
r16901 | }, | ||
Jessica B. Hamrick
|
r16902 | "name": {"$ref": "/definitions/misc/metadata_name"}, | ||
"tags": {"$ref": "/definitions/misc/metadata_tags"} | ||||
Jessica B. Hamrick
|
r16886 | } | ||
}, | ||||
Jessica B. Hamrick
|
r16902 | "source": {"$ref": "/definitions/misc/source"} | ||
Jessica B. Hamrick
|
r16886 | } | ||
}, | ||||
"markdown_cell": { | ||||
"description": "Notebook markdown cell.", | ||||
"type": "object", | ||||
"additionalProperties": false, | ||||
Jessica B. Hamrick
|
r16909 | "required": ["cell_type", "metadata"], | ||
Jessica B. Hamrick
|
r16886 | "properties": { | ||
"cell_type": { | ||||
"description": "String identifying the type of cell.", | ||||
Jessica B. Hamrick
|
r16909 | "enum": ["markdown"] | ||
Jessica B. Hamrick
|
r16882 | }, | ||
"metadata": { | ||||
Jessica B. Hamrick
|
r16883 | "description": "Cell-level metadata.", | ||
Jessica B. Hamrick
|
r16882 | "type": "object", | ||
Jessica B. Hamrick
|
r16901 | "properties": { | ||
Jessica B. Hamrick
|
r16902 | "name": {"$ref": "/definitions/misc/metadata_name"}, | ||
"tags": {"$ref": "/definitions/misc/metadata_tags"} | ||||
Jessica B. Hamrick
|
r16901 | }, | ||
Jessica B. Hamrick
|
r16882 | "additionalProperties": true | ||
}, | ||||
Jessica B. Hamrick
|
r16902 | "source": {"$ref": "/definitions/misc/source"} | ||
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, | ||||
Jessica B. Hamrick
|
r16909 | "required": ["cell_type", "metadata", "source", "level"], | ||
Jessica B. Hamrick
|
r16882 | "properties": { | ||
"cell_type": { | ||||
Jessica B. Hamrick
|
r16883 | "description": "String identifying the type of cell.", | ||
Jessica B. Hamrick
|
r16909 | "enum": ["heading"] | ||
Jessica B. Hamrick
|
r16882 | }, | ||
"metadata": { | ||||
Jessica B. Hamrick
|
r16883 | "description": "Cell-level metadata.", | ||
Jessica B. Hamrick
|
r16882 | "type": "object", | ||
Jessica B. Hamrick
|
r16901 | "properties": { | ||
Jessica B. Hamrick
|
r16902 | "name": {"$ref": "/definitions/misc/metadata_name"}, | ||
"tags": {"$ref": "/definitions/misc/metadata_tags"} | ||||
Jessica B. Hamrick
|
r16901 | }, | ||
Jessica B. Hamrick
|
r16882 | "additionalProperties": true | ||
}, | ||||
Jessica B. Hamrick
|
r16902 | "source": {"$ref": "/definitions/misc/source"}, | ||
Jessica B. Hamrick
|
r16882 | "level": { | ||
Jessica B. Hamrick
|
r16883 | "description": "Level of heading cells.", | ||
Jessica B. Hamrick
|
r16882 | "type": "integer", | ||
"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, | ||||
Jessica B. Hamrick
|
r16909 | "required": ["cell_type", "metadata", "source", "outputs", "prompt_number"], | ||
Jessica B. Hamrick
|
r16882 | "properties": { | ||
"cell_type": { | ||||
Jessica B. Hamrick
|
r16883 | "description": "String identifying the type of cell.", | ||
Jessica B. Hamrick
|
r16909 | "enum": ["code"] | ||
Jessica B. Hamrick
|
r16882 | }, | ||
"metadata": { | ||||
Jessica B. Hamrick
|
r16883 | "description": "Cell-level metadata.", | ||
Jessica B. Hamrick
|
r16882 | "type": "object", | ||
Jessica B. Hamrick
|
r16894 | "additionalProperties": true, | ||
"properties": { | ||||
"collapsed": { | ||||
"description": "Whether the cell is collapsed/expanded.", | ||||
Jessica B. Hamrick
|
r16909 | "type": "boolean" | ||
Jessica B. Hamrick
|
r16894 | }, | ||
"autoscroll": { | ||||
Jessica B. Hamrick
|
r16905 | "description": "Whether the cell's output is scrolled, unscrolled, or autoscrolled.", | ||
Jessica B. Hamrick
|
r16909 | "enum": [true, false, "auto"] | ||
Jessica B. Hamrick
|
r16901 | }, | ||
Jessica B. Hamrick
|
r16902 | "name": {"$ref": "/definitions/misc/metadata_name"}, | ||
"tags": {"$ref": "/definitions/misc/metadata_tags"} | ||||
Jessica B. Hamrick
|
r16894 | } | ||
Jessica B. Hamrick
|
r16882 | }, | ||
Jessica B. Hamrick
|
r16902 | "source": {"$ref": "/definitions/misc/source"}, | ||
Jessica B. Hamrick
|
r16882 | "outputs": { | ||
Jessica B. Hamrick
|
r16890 | "description": "Execution, display, or stream outputs.", | ||
Jessica B. Hamrick
|
r16882 | "type": "array", | ||
Jessica B. Hamrick
|
r16890 | "items": { | ||
Jessica B. Hamrick
|
r16909 | "type": "object", | ||
"oneOf": [ | ||||
Jessica B. Hamrick
|
r16905 | {"$ref": "/definitions/execute_result"}, | ||
Jessica B. Hamrick
|
r16902 | {"$ref": "/definitions/display_data_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"], | ||
"minimum": 0 | ||||
} | ||||
Jessica B. Hamrick
|
r16871 | } | ||
Jessica B. Hamrick
|
r16888 | }, | ||
Jessica B. Hamrick
|
r16905 | "execute_result": { | ||
Jessica B. Hamrick
|
r16889 | "description": "Result of executing a code cell.", | ||
"type": "object", | ||||
Jessica B. Hamrick
|
r16890 | "additionalProperties": false, | ||
Jessica B. Hamrick
|
r16909 | "required": ["output_type", "metadata", "prompt_number"], | ||
Jessica B. Hamrick
|
r16889 | "properties": { | ||
"output_type": { | ||||
"description": "Type of cell output.", | ||||
Jessica B. Hamrick
|
r16909 | "enum": ["execute_result"] | ||
Jessica B. Hamrick
|
r16889 | }, | ||
Jessica B. Hamrick
|
r16902 | "metadata": {"$ref": "/definitions/misc/output_metadata"}, | ||
"prompt_number": {"$ref": "/definitions/misc/prompt_number"} | ||||
}, | ||||
"patternProperties": {"$ref": "/definitions/misc/mimetype"} | ||||
}, | ||||
"display_data_output": { | ||||
"description": "Data displayed as a result of code cell execution.", | ||||
"type": "object", | ||||
"additionalProperties": false, | ||||
Jessica B. Hamrick
|
r16909 | "required": ["output_type", "metadata"], | ||
Jessica B. Hamrick
|
r16902 | "properties": { | ||
"output_type": { | ||||
"description": "Type of cell output.", | ||||
Jessica B. Hamrick
|
r16909 | "enum": ["display_data"] | ||
Jessica B. Hamrick
|
r16889 | }, | ||
Jessica B. Hamrick
|
r16902 | "metadata": {"$ref": "/definitions/misc/output_metadata"} | ||
Jessica B. Hamrick
|
r16899 | }, | ||
Jessica B. Hamrick
|
r16902 | "patternProperties": {"$ref": "/definitions/misc/mimetype"} | ||
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
|
r16909 | "required": ["output_type", "metadata", "stream"], | ||
Jessica B. Hamrick
|
r16889 | "properties": { | ||
"output_type": { | ||||
"description": "Type of cell output.", | ||||
Jessica B. Hamrick
|
r16909 | "enum": ["stream"] | ||
Jessica B. Hamrick
|
r16889 | }, | ||
Jessica B. Hamrick
|
r16902 | "metadata": {"$ref": "/definitions/misc/output_metadata"}, | ||
Jessica B. Hamrick
|
r16889 | "stream": { | ||
"description": "The stream type/destination.", | ||||
Jessica B. Hamrick
|
r16909 | "type": "string" | ||
Jessica B. Hamrick
|
r16889 | }, | ||
Jessica B. Hamrick
|
r16899 | "text/plain": { | ||
Jessica B. Hamrick
|
r16889 | "description": "The stream's text output, represented as an array of strings.", | ||
Jessica B. Hamrick
|
r16910 | "oneOf": {"$ref": "/definitions/misc/multiline_string"} | ||
Jessica B. Hamrick
|
r16889 | } | ||
} | ||||
Jessica B. Hamrick
|
r16892 | }, | ||
"error_output": { | ||||
"description": "Output of an error that occurred during code cell execution.", | ||||
"type": "object", | ||||
"additionalProperties": false, | ||||
Jessica B. Hamrick
|
r16909 | "required": ["output_type", "metadata", "ename", "evalue", "traceback"], | ||
Jessica B. Hamrick
|
r16892 | "properties": { | ||
"output_type": { | ||||
"description": "Type of cell output.", | ||||
Jessica B. Hamrick
|
r16909 | "enum": ["error"] | ||
Jessica B. Hamrick
|
r16892 | }, | ||
Jessica B. Hamrick
|
r16902 | "metadata": {"$ref": "/definitions/misc/output_metadata"}, | ||
Jessica B. Hamrick
|
r16892 | "ename": { | ||
"description": "The name of the error.", | ||||
Jessica B. Hamrick
|
r16909 | "type": "string" | ||
Jessica B. Hamrick
|
r16892 | }, | ||
"evalue": { | ||||
"description": "The value, or message, of the error.", | ||||
Jessica B. Hamrick
|
r16909 | "type": "string" | ||
Jessica B. Hamrick
|
r16892 | }, | ||
"traceback": { | ||||
"description": "The error's traceback, represented as an array of strings.", | ||||
"type": "array", | ||||
Jessica B. Hamrick
|
r16909 | "items": {"type": "string"} | ||
Jessica B. Hamrick
|
r16892 | } | ||
} | ||||
Jessica B. Hamrick
|
r16902 | }, | ||
"misc": { | ||||
"metadata_name": { | ||||
"description": "The cell's name. If present, must be a non-empty string.", | ||||
"type": "string", | ||||
"pattern": "^.+$" | ||||
}, | ||||
"metadata_tags": { | ||||
"description": "The cell's tags. Tags must be unique, and must not contain commas.", | ||||
"type": "array", | ||||
"uniqueItems": true, | ||||
"items": { | ||||
"type": "string", | ||||
"pattern": "^[^,]+$" | ||||
} | ||||
}, | ||||
"source": { | ||||
"description": "Contents of the cell, represented as an array of lines.", | ||||
Jessica B. Hamrick
|
r16910 | "oneOf": {"$ref": "/definitions/misc/multiline_string"} | ||
Jessica B. Hamrick
|
r16902 | }, | ||
"prompt_number": { | ||||
"description": "The code cell's prompt number. Will be null if the cell has not been run.", | ||||
"type": ["integer", "null"], | ||||
"minimum": 0 | ||||
}, | ||||
"mimetype": { | ||||
"^[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.", | ||||
Jessica B. Hamrick
|
r16910 | "oneOf": {"$ref": "/definitions/misc/multiline_string"} | ||
Jessica B. Hamrick
|
r16902 | } | ||
}, | ||||
"output_metadata": { | ||||
"description": "Cell output metadata.", | ||||
"type": "object", | ||||
"additionalProperties": true | ||||
Jessica B. Hamrick
|
r16910 | }, | ||
"multiline_string": [ | ||||
{"type": "string"}, | ||||
{ | ||||
"type": "array", | ||||
"items": {"type": "string"} | ||||
} | ||||
] | ||||
Jessica B. Hamrick
|
r16871 | } | ||
} | ||||
} | ||||