Skip to content

Commit 1c6aa0a

Browse files
committed
add descriptions. specify UUID, timestamp formatting
1 parent 9bf9c87 commit 1c6aa0a

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

schemas/message.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,59 +3,59 @@
33
"id": "http://jsonschema.net",
44
"type": "object",
55
"title": "Root schema.",
6-
"description": "An explanation about the puropose of this instance described by this schema.",
6+
"description": "OpenKnot Communications Platform Schema: https://github.com/openknot/openknot/blob/master/schemas/message.json",
77
"name": "/",
88
"properties": {
99
"message": {
1010
"id": "http://jsonschema.net/message",
1111
"type": "object",
1212
"title": "Message schema.",
13-
"description": "An explanation about the puropose of this instance described by this schema.",
13+
"description": "All messages sent/received by OpenKnot should be serializable to this schema",
1414
"name": "message",
1515
"properties": {
1616
"id": {
1717
"id": "http://jsonschema.net/message/id",
18-
"type": "integer",
18+
"type": "string",
1919
"title": "Id schema.",
20-
"description": "An explanation about the puropose of this instance described by this schema.",
20+
"description": "A UUID for this message: 32 lowercase hexadecimal digits, displayed in five groups separated by hyphens, in the form 8-4-4-4-12",
2121
"name": "id",
22-
"default": 1234
22+
"default": "00000000-0000-0000-0000-000000000000"
2323
},
2424
"timestamp": {
2525
"id": "http://jsonschema.net/message/timestamp",
2626
"type": "string",
2727
"title": "Timestamp schema.",
28-
"description": "An explanation about the puropose of this instance described by this schema.",
28+
"description": "ISO8601 formatted datetime with millisecond precision ALWAYS expressed as UTC",
2929
"name": "timestamp",
30-
"default": "2015-08-01 00:00:00 +1000"
30+
"default": "2015-08-04T14:23:19.234Z"
3131
},
3232
"protocol": {
3333
"id": "http://jsonschema.net/message/protocol",
3434
"type": "string",
35-
"title": "Protocol schema.",
36-
"description": "An explanation about the puropose of this instance described by this schema.",
35+
"title": "Initial Protocol Schema.",
36+
"description": "The protocol that was originally used to create the message: IRC/NNTP/XMPP/SMTP/etc.",
3737
"name": "protocol",
3838
"default": "IRC"
3939
},
4040
"source": {
4141
"id": "http://jsonschema.net/message/source",
4242
"type": "string",
4343
"title": "Source schema.",
44-
"description": "An explanation about the puropose of this instance described by this schema.",
44+
"description": "The identifier for the Agent that created the message",
4545
"name": "source",
4646
"default": "prologic"
4747
},
48-
"targets": {
49-
"id": "http://jsonschema.net/message/targets",
48+
"destinations": {
49+
"id": "http://jsonschema.net/message/destinations",
5050
"type": "array",
51-
"title": "Targets schema.",
52-
"description": "An explanation about the puropose of this instance described by this schema.",
53-
"name": "targets",
51+
"title": "Destinations schema.",
52+
"description": "A list of destination Agents to which the message should be delivered",
53+
"name": "destinations",
5454
"items": {
55-
"id": "http://jsonschema.net/message/targets/0",
55+
"id": "http://jsonschema.net/message/destinations/0",
5656
"type": "string",
5757
"title": "0 schema.",
58-
"description": "An explanation about the puropose of this instance described by this schema.",
58+
"description": "The Agent identifier for this destination for this message",
5959
"name": "0",
6060
"default": "#openknot"
6161
}
@@ -64,7 +64,7 @@
6464
"id": "http://jsonschema.net/message/content",
6565
"type": "string",
6666
"title": "Content schema.",
67-
"description": "An explanation about the puropose of this instance described by this schema.",
67+
"description": "The content of the message, including any headers by extension",
6868
"name": "content",
6969
"default": "Test!"
7070
}
@@ -74,7 +74,7 @@
7474
"timestamp",
7575
"protocol",
7676
"source",
77-
"targets",
77+
"destinations",
7878
"content"
7979
]
8080
}

0 commit comments

Comments
 (0)