Skip to content

Instantly share code, notes, and snippets.

@Schwartz10
Last active May 14, 2019 01:06
Show Gist options
  • Save Schwartz10/15a159e237a47bea4692d13b1cf013ea to your computer and use it in GitHub Desktop.
Save Schwartz10/15a159e237a47bea4692d13b1cf013ea to your computer and use it in GitHub Desktop.
A first take at streams json schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://gist.github.com/Schwartz10/15a159e237a47bea4692d13b1cf013ea",
"title": "StreamEvent",
"description": "An event in a stream",
"type": "object",
"properties": {
"type": {
"description": "The type of stream event that occured",
"type": "string"
},
"data": {
"description": "The data associated with the stream event",
"type": "object",
},
"files": {
"description": "The root hash of an IPFS file(s) DAG",
"type": "array",
"items": {
"type": "object",
"properties": {
"cid": {
"type": "string"
}
},
"required": ["cid"]
},
"uniqueItems": true
}
},
"required": ["type", "data"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment