From 8afbf57e36535f0fc0ec448de40e8fc941913a9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Tue, 29 Oct 2019 08:55:42 -0300 Subject: [PATCH] Json schema for spec v1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- ext/spec_1.json | 80 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 ext/spec_1.json diff --git a/ext/spec_1.json b/ext/spec_1.json new file mode 100644 index 0000000..50e1a60 --- /dev/null +++ b/ext/spec_1.json @@ -0,0 +1,80 @@ +{ + "$ref": "#/definitions/event", + "definitions": { + "specversion": { + "type": "string", + "minLength": 1, + "const": "1.0" + }, + "datacontenttype": { + "type": "string" + }, + "data": { + "type": ["object", "string"] + }, + "data_base64": { + "type": "string" + }, + "event": { + "properties": { + "specversion": { + "$ref": "#/definitions/specversion" + }, + "datacontenttype": { + "$ref": "#/definitions/datacontenttype" + }, + "data": { + "$ref": "#/definitions/data" + }, + "data_base64": { + "$ref": "#/definitions/data_base64" + }, + "id": { + "$ref": "#/definitions/id" + }, + "time": { + "$ref": "#/definitions/time" + }, + "dataschema": { + "$ref": "#/definitions/dataschema" + }, + "subject": { + "$ref": "#/definitions/subject" + }, + "type": { + "$ref": "#/definitions/type" + }, + "source": { + "$ref": "#/definitions/source" + } + }, + "required": ["specversion", "id", "type", "source"], + "type": "object" + }, + "id": { + "type": "string", + "minLength": 1 + }, + "time": { + "format": "date-time", + "type": "string" + }, + "dataschema": { + "type": "string", + "format": "uri" + }, + "subject": { + "type": "string", + "minLength": 1 + }, + "type": { + "type": "string", + "minLength": 1 + }, + "source": { + "format": "uri-reference", + "type": "string" + } + }, + "type": "object" +}