From 4be1eca22bbe9de5ea51fd3d04579b50fc3694d2 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Mon, 5 Jun 2017 14:08:44 +0200 Subject: [PATCH] Initial commit --- package.json | 16 ++++++++++ schemas/contribution.json | 66 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 package.json create mode 100644 schemas/contribution.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..961dc36 --- /dev/null +++ b/package.json @@ -0,0 +1,16 @@ +{ + "name": "kosmos-schemas", + "version": "1.0.0", + "description": "JSON-LD schemas for Kosmos data formats", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [ + "kosmos", + "ipfs", + "remotestorage" + ], + "author": "Kosmos Contributors ", + "license": "MIT" +} diff --git a/schemas/contribution.json b/schemas/contribution.json new file mode 100644 index 0000000..bfd95e5 --- /dev/null +++ b/schemas/contribution.json @@ -0,0 +1,66 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "http://schemas.kosmos.org/Contribution", + "properties": { + "@context": { + "type": "string", + "enum": "https://schema.kosmos.org/", + "default": "https://schema.kosmos.org/" + }, + "@type": { + "type": "string", + "enum": "Contribution", + "default": "Contribution" + }, + "contributor": { + "properties": { + "uri": { + "type": "string", + "format": "uri", + "title": "IPFS URI", + "description": "An IPFS object URI containing profile information of the contributor" + } + }, + "required": [ + "ipfs" + ], + "type": "object" + }, + "kind": { + "type": "string", + "title": "Kind", + "items": { + "description": "Type/category of contribution", + "enum": [ + "dev", + "design", + "ops", + "docs", + "community" + ] + }, + "type": "array" + }, + "description": { + "type": "string", + "title": "Description", + "description": "A summary of the contribution. Can be manually entered or automatically generated." + }, + "url": { + "type": "string", + "format": "uri", + "title": "URL", + "description": "A URL pointing to human-readable details of the contribution" + }, + "details": { + "type": "object", + "properties": {} + } + }, + "required": [ + "contributor", + "kind", + "description" + ], + "type": "object" +}