Initial schema push - covers PIS only
This commit is contained in:
46
schemas/data-ingress/api-envelope.json
Normal file
46
schemas/data-ingress/api-envelope.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"$id": "https://schema.owlboard.info/api/api-envelope.schema.json",
|
||||
"$schema": "https://json-schema.org/draft-07/schema#",
|
||||
"title": "ApiEnvelope",
|
||||
"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",
|
||||
"anyOf": [
|
||||
{"type": "object"},
|
||||
{"type": "array"}
|
||||
]
|
||||
},
|
||||
"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
|
||||
}
|
||||
Reference in New Issue
Block a user