From c298b08976c2bde340a5fa5565a712c8fbb73ca5 Mon Sep 17 00:00:00 2001 From: Wes Turner Date: Fri, 9 Sep 2016 13:39:06 -0500 Subject: [PATCH] SCH: name, author, license metadata properties (and @context for JSONLD) --- nbformat/tests/test4docinfo.ipynb | 4 +-- nbformat/v4/nbformat.v4.schema.json | 38 ++++++++++++++++++++++++++--- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/nbformat/tests/test4docinfo.ipynb b/nbformat/tests/test4docinfo.ipynb index fa9e5ca8..14e25fa8 100644 --- a/nbformat/tests/test4docinfo.ipynb +++ b/nbformat/tests/test4docinfo.ipynb @@ -303,8 +303,8 @@ } ], "metadata": { - "title": "Test Notebook", - "author": "Jean Tester" + "name": "Test Notebook", + "author": [{'name': "Jean Tester"}], }, "nbformat": 4, "nbformat_minor": 0 diff --git a/nbformat/v4/nbformat.v4.schema.json b/nbformat/v4/nbformat.v4.schema.json index 7d60bd3a..cc378f70 100644 --- a/nbformat/v4/nbformat.v4.schema.json +++ b/nbformat/v4/nbformat.v4.schema.json @@ -10,6 +10,10 @@ "type": "object", "additionalProperties": true, "properties": { + "@context": { + "description": "The JSONLD @context of the metadata", + "type": ["string", "object"] + }, "kernelspec": { "description": "Kernel information.", "type": "object", @@ -60,13 +64,39 @@ "type": "integer", "minimum": 1 }, - "title": { - "description": "The title of the notebook document", + "name": { + "description": "The schema.org/name (title) of the notebook document", "type": "string" }, "author": { - "description": "The author(s) of the notebook document", - "type": "string" + "description": "The schema.org/author(s) of the notebook document", + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": {"type": "string"}, + "name": {"type": "string"}, + "givenName": {"type": "string"}, + "familyName": {"type": "string"}, + "email": {"type": "email"}, + "url": {"type": "url"} + }, + "additionalProperties": true + } + }, + "license": { + "description": "The schema.org/license(s) of the notebook document with SPDX license key", + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": {"type": "string"}, + "name": {"type": "string"}, + "description": {"type": "string"}, + "url": {"type": "url"} + }, + "additionalProperties": true + } } } },