Files
chat/schema/s2s/link.json
user 065b243def 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.
2026-02-10 10:25:42 -08:00

42 lines
1.0 KiB
JSON

{
"$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"]
}