From 09859b8b7b06ba203063d3d6e401acf1dd75ea09 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sun, 12 Jan 2025 21:34:14 +0000 Subject: [PATCH] Add schema for PIS files --- .schema/owlboard-pis-schema.json | 36 ++++++++++++++++++++++++++++++++ .vscode/settings.json | 6 ++++++ 2 files changed, 42 insertions(+) create mode 100644 .schema/owlboard-pis-schema.json create mode 100644 .vscode/settings.json diff --git a/.schema/owlboard-pis-schema.json b/.schema/owlboard-pis-schema.json new file mode 100644 index 0000000..0059066 --- /dev/null +++ b/.schema/owlboard-pis-schema.json @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "OwlBoard PIS", + "description": "OwlBoard PIS files, used for ingesting PIS data into OwlBoard", + "type": "object", + "additionalProperties": false, + "properties": { + "pis": { + "type": "array", + "description": "A list of PIS codes to include in the file", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The four character PIS code as a string" + }, + "stops": { + "type": "array", + "description": "A list of 3ALPHA/CRS codes represented by the 'code'.", + "items": { + "type": "string" + } + } + }, + "required": [ + "code", + "stops" + ] + } + } + }, + "required": [ + "pis" + ] + } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9644477 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{"yaml.schemas": { + "/home/fred.boniface/git/owlboard/data/.schema/owlboard-pis-schema.json": [ + "file:///home/fred.boniface/git/owlboard/data/pis/auto-dgp2-2025-01-12_20-48-03.yaml", + "file:///home/fred.boniface/git/owlboard/data/pis/gw.yaml" + ] + }} \ No newline at end of file