From 4d8cb5a9e60ace84cfa15958126535f8ce60d751 2014-06-09 18:53:34 From: Jessica B. Hamrick Date: 2014-06-09 18:53:34 Subject: [PATCH] Define multiline_string type --- diff --git a/IPython/nbformat/v4/v4.withref.json b/IPython/nbformat/v4/v4.withref.json index 5a62fab..4a114f9 100644 --- a/IPython/nbformat/v4/v4.withref.json +++ b/IPython/nbformat/v4/v4.withref.json @@ -244,7 +244,7 @@ }, "text/plain": { "description": "The stream's text output, represented as an array of strings.", - "type": ["string", "array"] + "oneOf": {"$ref": "/definitions/misc/multiline_string"} } } }, @@ -293,7 +293,7 @@ }, "source": { "description": "Contents of the cell, represented as an array of lines.", - "type": ["string", "array"] + "oneOf": {"$ref": "/definitions/misc/multiline_string"} }, "prompt_number": { "description": "The code cell's prompt number. Will be null if the cell has not been run.", @@ -303,14 +303,21 @@ "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.", - "type": ["string", "array"] + "oneOf": {"$ref": "/definitions/misc/multiline_string"} } }, "output_metadata": { "description": "Cell output metadata.", "type": "object", "additionalProperties": true - } + }, + "multiline_string": [ + {"type": "string"}, + { + "type": "array", + "items": {"type": "string"} + } + ] } } }