mirror of
https://github.com/cadmium-im/cadmium-docs-legacy.git
synced 2024-11-08 19:51:02 +00:00
Add Protocol Error JSON Schema
This commit is contained in:
parent
e7f7d9589f
commit
2e86296ef3
44
protocol-spec/json-schema/ProtocolError.schema.json
Normal file
44
protocol-spec/json-schema/ProtocolError.schema.json
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"definitions": {},
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"$id": "urn:cadmium:1",
|
||||||
|
"type": "object",
|
||||||
|
"title": "Protocol Error Schema",
|
||||||
|
"required": [
|
||||||
|
"errCode",
|
||||||
|
"errText"
|
||||||
|
],
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"errCode": {
|
||||||
|
"$id": "#/properties/errCode",
|
||||||
|
"type": "integer",
|
||||||
|
"title": "Error Code",
|
||||||
|
"description": "Error code (defined in extensions, may be same per extensions)",
|
||||||
|
"examples": [
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
4
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"errText": {
|
||||||
|
"$id": "#/properties/errText",
|
||||||
|
"type": "string",
|
||||||
|
"title": "Error Text",
|
||||||
|
"description": "Explanation of error in human-readable view",
|
||||||
|
"examples": [
|
||||||
|
"Incorrect type of message (type isn't implemented in the server)",
|
||||||
|
"Rate-limit exceed"
|
||||||
|
],
|
||||||
|
"pattern": "^(.*)$"
|
||||||
|
},
|
||||||
|
"errPayload": {
|
||||||
|
"$id": "#/properties/errPayload",
|
||||||
|
"type": "object",
|
||||||
|
"title": "Error Payload",
|
||||||
|
"description": "Advanced error information (fields defined in extensions)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user