v4.withref.json
201 lines
| 7.2 KiB
| application/json
|
JsonLexer
|
r16871 | { | ||
|
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": { | ||||
|
r16884 | "description": "Other kernel information, to be determined.", | ||
|
r16882 | "type": "object", | ||
"required": true, | ||||
"additionalProperties": true | ||||
|
r16885 | }, | ||
"signature": { | ||||
"description": "SHA256 hash of the notebook.", | ||||
"type": "string", | ||||
"required": true, | ||||
"pattern": "^sha256:[0-9a-b]{256}$" | ||||
|
r16878 | } | ||
|
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, | ||||
"minimum": 4 | ||||
}, | ||||
"orig_nbformat": { | ||||
"description": "Original notebook format (major number) before converting the notebook between versions.", | ||||
"type": "integer", | ||||
"required": false, | ||||
"minimum": 1 | ||||
}, | ||||
"cells": { | ||||
|
r16883 | "description": "Array of cells of the current notebook.", | ||
|
r16882 | "type": "array", | ||
"required": true, | ||||
"items": { | ||||
"type": [ | ||||
{"$ref": "#/definitions/text_cell"}, | ||||
{"$ref": "#/definitions/heading_cell"}, | ||||
{"$ref": "#/definitions/code_cell"} | ||||
] | ||||
|
r16871 | } | ||
} | ||||
}, | ||||
|
r16882 | "definitions": { | ||
|
r16886 | "raw_cell": { | ||
"description": "Notebook raw nbconvert cell.", | ||||
|
r16882 | "type": "object", | ||
"additionalProperties": false, | ||||
"properties": { | ||||
"cell_type": { | ||||
|
r16883 | "description": "String identifying the type of cell.", | ||
|
r16886 | "enum": ["raw"], | ||
"required": true | ||||
}, | ||||
"metadata": { | ||||
"description": "Cell-level metadata.", | ||||
"type": "object", | ||||
"required": true, | ||||
"additionalProperties": true, | ||||
"properties": { | ||||
"format": { | ||||
"description": "Raw cell format, to be determined.", | ||||
"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"], | ||||
|
r16874 | "required": true | ||
|
r16882 | }, | ||
"metadata": { | ||||
|
r16883 | "description": "Cell-level metadata.", | ||
|
r16882 | "type": "object", | ||
"required": true, | ||||
"additionalProperties": true | ||||
}, | ||||
"source": { | ||||
|
r16886 | "description": "Contents of the cell, represented as an array of lines.", | ||
|
r16882 | "type": "array", | ||
"required": true, | ||||
|
r16886 | "items": {"type": "string"} | ||
|
r16874 | } | ||
|
r16871 | } | ||
|
r16882 | }, | ||
|
r16871 | |||
|
r16882 | "heading_cell": { | ||
|
r16883 | "description": "Notebook heading cell.", | ||
|
r16882 | "type": "object", | ||
"additionalProperties": false, | ||||
"properties": { | ||||
"cell_type": { | ||||
|
r16883 | "description": "String identifying the type of cell.", | ||
|
r16882 | "enum": ["heading"], | ||
|
r16874 | "required": true | ||
|
r16882 | }, | ||
"metadata": { | ||||
|
r16883 | "description": "Cell-level metadata.", | ||
|
r16882 | "type": "object", | ||
"required": true, | ||||
"additionalProperties": true | ||||
}, | ||||
"source": { | ||||
|
r16886 | "description": "Contents of the cell, represented as an array of lines.", | ||
|
r16882 | "type": "array", | ||
"required": true, | ||||
|
r16886 | "items": {"type": "string"} | ||
|
r16882 | }, | ||
"level": { | ||||
|
r16883 | "description": "Level of heading cells.", | ||
|
r16882 | "type": "integer", | ||
|
r16883 | "required": true, | ||
|
r16882 | "minimum": 1, | ||
"maximum": 6 | ||||
|
r16874 | } | ||
|
r16876 | } | ||
|
r16882 | }, | ||
"code_cell": { | ||||
|
r16883 | "description": "Notebook code cell.", | ||
|
r16882 | "type": "object", | ||
"additionalProperties": false, | ||||
"properties": { | ||||
"cell_type": { | ||||
|
r16883 | "description": "String identifying the type of cell.", | ||
|
r16882 | "enum": ["code"], | ||
"required": true | ||||
}, | ||||
"metadata": { | ||||
|
r16883 | "description": "Cell-level metadata.", | ||
|
r16882 | "type": "object", | ||
"required": true, | ||||
"additionalProperties": true | ||||
}, | ||||
"source": { | ||||
|
r16886 | "description": "Contents of the cell, represented as an array of lines.", | ||
|
r16882 | "type": "array", | ||
"required": true, | ||||
|
r16886 | "items": {"type": "string"} | ||
|
r16884 | }, | ||
|
r16882 | "outputs": { | ||
|
r16883 | "description": "Outputs of cell, to be defined.", | ||
|
r16882 | "type": "array", | ||
"required": true | ||||
}, | ||||
"collapsed": { | ||||
|
r16883 | "description": "Whether the cell is collapsed/expanded.", | ||
|
r16882 | "type": "boolean", | ||
"required": true | ||||
}, | ||||
"autoscroll": { | ||||
|
r16883 | "description": "Whether the cell's output should autoscroll.", | ||
|
r16882 | "type": "boolean", | ||
"required": true | ||||
}, | ||||
"prompt_number": { | ||||
|
r16883 | "description": "The code cell's prompt number. Will be null if the cell has not been run.", | ||
|
r16882 | "type": ["integer", "null"], | ||
"required": true, | ||||
"minimum": 0 | ||||
} | ||||
|
r16871 | } | ||
} | ||||
} | ||||
} | ||||