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:
22
schema/c2s/part.json
Normal file
22
schema/c2s/part.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://git.eeqj.de/sneak/chat/schema/c2s/part.json",
|
||||
"title": "C2S Part",
|
||||
"description": "Leave a channel. Submitted via DELETE /api/v1/channels/{name}.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"channel": {
|
||||
"type": "string",
|
||||
"description": "Channel name to leave.",
|
||||
"pattern": "^#[a-zA-Z0-9_-]+$",
|
||||
"examples": ["#general"]
|
||||
},
|
||||
"reason": {
|
||||
"type": "string",
|
||||
"description": "Optional part reason message.",
|
||||
"maxLength": 256
|
||||
}
|
||||
},
|
||||
"required": ["channel"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
Reference in New Issue
Block a user