Skip to content

Commit

Permalink
Merge pull request jupyter#169 from jasongrout/json40
Browse files Browse the repository at this point in the history
Allow notebook format 4.0 to have arbitrary JSON in mimebundle keys ending with +json.
  • Loading branch information
MSeal committed Mar 26, 2020
2 parents 1b30177 + a0f3952 commit d6e97d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
3 changes: 2 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Changes in nbformat
In Development
==============

- Allow notebook format 4.1 to have the arbitrary JSON mimebundles from format 4.2 for pragmatic purposes.
- Allow notebook format 4.0 and 4.1 to have the arbitrary JSON mimebundles
from format 4.2 for pragmatic purposes.

5.0.4
=====
Expand Down
13 changes: 5 additions & 8 deletions nbformat/v4/nbformat.v4.0.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -339,16 +339,13 @@
"mimebundle": {
"description": "A mime-type keyed dictionary of data",
"type": "object",
"additionalProperties": false,
"properties": {
"application/json": {
"type": "object"
}
"additionalProperties": {
"description": "mimetype output (e.g. text/plain), represented as either an array of strings or a string.",
"$ref": "#/definitions/misc/multiline_string"
},
"patternProperties": {
"^(?!application/json$)[a-zA-Z0-9]+/[a-zA-Z0-9\\-\\+\\.]+$": {
"description": "mimetype output (e.g. text/plain), represented as either an array of strings or a string.",
"$ref": "#/definitions/misc/multiline_string"
"^application/(.*\\+)?json$": {
"description": "Mimetypes with JSON output, can be any type"
}
}
},
Expand Down

0 comments on commit d6e97d4

Please sign in to comment.