Rename directories to fit with API schema
All checks were successful
Generate and Release Protos / release (push) Successful in 37s

This commit is contained in:
2026-02-17 20:15:20 +00:00
parent 7259dfaa37
commit 6298763f2f
2 changed files with 2 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
{
"$id": "https://schema.owlboard.info/api/api-envelope.schema.json",
"$schema": "https://json-schema.org/draft-07/schema#",
"title": "ApiEnvelope",
"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",
"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
}

View File

@@ -0,0 +1,42 @@
{
"$id": "https://schema.owlboard.info/api/pis-object.schema.json",
"$schema": "https://json-schema.org/draft-07/schema#",
"title": "PisObjects",
"description": "PIS API Resonse, contains the code and optionally, TOC and/or a list of CRS, TIPLOC",
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "PIS Code - Code that is entered in to the PIS system"
},
"toc": {
"type": "string",
"minLength": 2,
"maxLength": 2,
"pattern": "^[a-zA-Z]+$",
"description": "Two letter TOC Code"
},
"crsStops": {
"type": "array",
"items": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"pattern": "^[a-zA-Z]+$"
},
"description": "List of 3ALPHA/CRS Codes"
},
"tiplocStops": {
"type": "array",
"items": {
"type": "string",
"minLength": 4,
"maxLength": 7,
"pattern": "^[a-zA-Z0-9]+$"
},
"description": "List of TIPLOC Codes"
}
},
"required": ["code"],
"additionalProperties": false
}