docs: add JSON Schema definitions for all message types (draft 2020-12)
C2S (7): send, join, part, nick, topic, mode, ping
S2C (12): message, dm, notice, join, part, quit, nick, topic, mode, system, error, pong
S2S (6): relay, link, unlink, sync, ping, pong
Each message type has its own schema file under schema/{c2s,s2c,s2s}/.
schema/README.md provides an index of all types with descriptions.
This commit is contained in:
41
schema/s2s/link.json
Normal file
41
schema/s2s/link.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://git.eeqj.de/sneak/chat/schema/s2s/link.json",
|
||||
"title": "S2S Link",
|
||||
"description": "Server link establishment request/response.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"type": {
|
||||
"const": "link"
|
||||
},
|
||||
"ts": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"origin": {
|
||||
"type": "string",
|
||||
"description": "Requesting server name."
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "Protocol version of the requesting server."
|
||||
},
|
||||
"auth": {
|
||||
"type": "string",
|
||||
"description": "HMAC signature over the link request using the shared federation key."
|
||||
},
|
||||
"capabilities": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "List of supported protocol capabilities.",
|
||||
"examples": [["relay", "sync", "presence"]]
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "ts", "origin", "auth"]
|
||||
}
|
||||
Reference in New Issue
Block a user