Skip to content

Commit

Permalink
Added a design guide for how we represent messages
Browse files Browse the repository at this point in the history
  • Loading branch information
prologic committed Jul 28, 2015
1 parent 13fcaa7 commit f2a4d93
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 0 deletions.
Binary file added .README.md.un~
Binary file not shown.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -10,3 +10,6 @@ The fundamental idea is that:

_*Decoupling the messages/threads/channels from the transport/storage mechanisms allows the user agent software maximum flexibility to present information and functionality in a manner that is delightful to the human.*_

## Resources

- [Message Schema](https://github.com/openknot/openknot/blob/master/schemas/message.json)
85 changes: 85 additions & 0 deletions schemas/message.json
@@ -0,0 +1,85 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "http://jsonschema.net",
"type": "object",
"title": "Root schema.",
"description": "An explanation about the puropose of this instance described by this schema.",
"name": "/",
"properties": {
"message": {
"id": "http://jsonschema.net/message",
"type": "object",
"title": "Message schema.",
"description": "An explanation about the puropose of this instance described by this schema.",
"name": "message",
"properties": {
"id": {
"id": "http://jsonschema.net/message/id",
"type": "integer",
"title": "Id schema.",
"description": "An explanation about the puropose of this instance described by this schema.",
"name": "id",
"default": 1234
},
"timestamp": {
"id": "http://jsonschema.net/message/timestamp",
"type": "string",
"title": "Timestamp schema.",
"description": "An explanation about the puropose of this instance described by this schema.",
"name": "timestamp",
"default": "2015-08-01 00:00:00 +1000"
},
"protocol": {
"id": "http://jsonschema.net/message/protocol",
"type": "string",
"title": "Protocol schema.",
"description": "An explanation about the puropose of this instance described by this schema.",
"name": "protocol",
"default": "IRC"
},
"source": {
"id": "http://jsonschema.net/message/source",
"type": "string",
"title": "Source schema.",
"description": "An explanation about the puropose of this instance described by this schema.",
"name": "source",
"default": "prologic"
},
"targets": {
"id": "http://jsonschema.net/message/targets",
"type": "array",
"title": "Targets schema.",
"description": "An explanation about the puropose of this instance described by this schema.",
"name": "targets",
"items": {
"id": "http://jsonschema.net/message/targets/0",
"type": "string",
"title": "0 schema.",
"description": "An explanation about the puropose of this instance described by this schema.",
"name": "0",
"default": "#openknot"
}
},
"content": {
"id": "http://jsonschema.net/message/content",
"type": "string",
"title": "Content schema.",
"description": "An explanation about the puropose of this instance described by this schema.",
"name": "content",
"default": "Test!"
}
},
"required": [
"id",
"timestamp",
"protocol",
"source",
"targets",
"content"
]
}
},
"required": [
"message"
]
}

0 comments on commit f2a4d93

Please sign in to comment.