Files
api-schemas/schemas/api/envelope.json
Fred Boniface 07f224ff18
All checks were successful
Generate and Release Protos / release (push) Successful in 29s
Relax type requirements on 'd' (data payload) field to improve type generation
2026-02-19 21:05:33 +00:00

43 lines
1.3 KiB
JSON

{
"$id": "https://schema.owlboard.info/api/api-envelope.schema.json",
"$schema": "https://json-schema.org/draft-07/schema#",
"title": "Envelope",
"description": "OwlBoard API Envelope",
"type": "object",
"properties": {
"t": {
"type": "integer",
"minimum": 0,
"description": "Unix timestamp showing when the data was generated, or the time the error was encountered"
},
"d": {
"description": "Payload data. Type depends on request endpoint"
},
"e": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Type of error encountered",
"enum": [
"VALIDATION",
"AUTH",
"NOT_FOUND",
"RATE_LIMIT",
"SERVER"
]
},
"msg": {
"type": "string",
"description": "Human-readable descriptive error message."
}
}
}
},
"required": ["t"],
"oneOf": [
{"required": ["e"]},
{"required": ["d"]}
],
"additionalProperties": false
}