2 Commits

Author SHA1 Message Date
0848fe3b27 Create location filter schema
All checks were successful
Generate and Release Protos / release (push) Successful in 29s
2026-03-24 00:38:08 +00:00
8ac0215247 Feat: Add 'skip' object to the PISObject schema to allow for partial matches to be described.
All checks were successful
Generate and Release Protos / release (push) Successful in 28s
2026-02-20 22:31:01 +00:00
2 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
{
"$id": "https://schema.owlboard.info/api/location-filter.schema.json",
"$schema": "https://json-schema.org/draft-07/schema#",
"title": "LocationFilterObject",
"description": "Location filter API Response. Provides a location's data for filtering on the frontend",
"type": "object",
"required": ["n", "t", "s"],
"additionalProperties": false,
"properties": {
"n": {
"type": "string",
"name": "Name",
"description": "Name of the location"
},
"t": {
"type": "string",
"name": "TIPLOC",
"description": "TIPLOC of the location"
},
"c": {
"type": "string",
"name": "CRS",
"description": "CRS of the location"
},
"s": {
"type": "string",
"name": "searchString",
"description": "Generated string for efficient filtering"
}
}
}

View File

@@ -35,6 +35,20 @@
"pattern": "^[a-zA-Z0-9]+$"
},
"description": "List of TIPLOC Codes"
},
"skip": {
"type": "object",
"properties": {
"skip": {
"type": "integer",
"description": "Number of stops to skip"
},
"position": {
"type": "string",
"enum": ["head", "tail"],
"description": "Position of stops to be skipped, either 'head' or 'tail'"
}
}
}
},
"required": ["code"],