Json schema for spec v1

Signed-off-by: Fabio José <fabiojose@gmail.com>
This commit is contained in:
Fabio José 2019-10-29 08:55:42 -03:00
parent 48258bb01a
commit 8afbf57e36
1 changed files with 80 additions and 0 deletions

80
ext/spec_1.json Normal file
View File

@ -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"
}