-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathoba-validator-report.schema.json
More file actions
114 lines (114 loc) · 4.31 KB
/
Copy pathoba-validator-report.schema.json
File metadata and controls
114 lines (114 loc) · 4.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/onebusaway/oba-validator/schema/oba-validator-report.schema.json",
"title": "OBA Validator Output",
"description": "Output of `oba-validator --json`: either a validation report document or an error document. Both carry a top-level schemaVersion.",
"oneOf": [
{ "$ref": "#/$defs/reportDocument" },
{ "$ref": "#/$defs/errorDocument" }
],
"$defs": {
"status": {
"type": "string",
"enum": ["PASS", "WARN", "FAIL", "SKIP"]
},
"counts": {
"type": "object",
"description": "Result tallies by status.",
"additionalProperties": false,
"required": ["pass", "warn", "fail", "skip"],
"properties": {
"pass": { "type": "integer", "minimum": 0 },
"warn": { "type": "integer", "minimum": 0 },
"fail": { "type": "integer", "minimum": 0 },
"skip": { "type": "integer", "minimum": 0 }
}
},
"item": {
"type": "object",
"description": "One check result. category/step are the check name split on the first '/'.",
"additionalProperties": false,
"required": ["check", "category", "status", "message"],
"properties": {
"check": { "type": "string" },
"category": { "type": "string" },
"step": { "type": "string" },
"status": { "$ref": "#/$defs/status" },
"message": { "type": "string" },
"details": { "type": "object", "additionalProperties": true }
}
},
"group": {
"type": "object",
"description": "A section of results: the server, or one data source.",
"additionalProperties": false,
"required": ["id", "label", "counts", "results"],
"properties": {
"id": { "type": "string", "description": "'server' or 'dataSource[N]'; joins to meta.dataSources[].id." },
"label": { "type": "string" },
"counts": { "$ref": "#/$defs/counts" },
"results": { "type": "array", "items": { "$ref": "#/$defs/item" } }
}
},
"metaSource": {
"type": "object",
"description": "Echo of one configured data source. The apiKey is never present.",
"additionalProperties": false,
"required": ["id", "index"],
"properties": {
"id": { "type": "string" },
"index": { "type": "integer", "minimum": 0 },
"staticGtfsFeedURL": { "type": "string" },
"vehiclePositionsURL": { "type": "string" },
"tripUpdatesURL": { "type": "string" },
"serviceAlertsURL": { "type": "string" },
"agencyMapping": { "type": "object", "additionalProperties": { "type": "string" } }
}
},
"meta": {
"type": "object",
"additionalProperties": false,
"required": ["generatedAt", "obaServerURL", "dataSources"],
"properties": {
"generatedAt": { "type": "string", "format": "date-time" },
"obaServerURL": { "type": "string" },
"dataSources": { "type": "array", "items": { "$ref": "#/$defs/metaSource" } }
}
},
"summary": {
"type": "object",
"additionalProperties": false,
"required": ["verdict", "exitCode", "total", "counts"],
"properties": {
"verdict": { "type": "string", "enum": ["PASS", "FAIL"] },
"exitCode": {
"type": "integer",
"const": 0,
"description": "Always 0 for a completed run. The PASS/FAIL verdict is conveyed by 'verdict' above, not by this field; the process exit code is reserved for 'the validator could not run' (exit 2 on config error). Field is retained for schema stability."
},
"total": { "type": "integer", "minimum": 0 },
"counts": { "$ref": "#/$defs/counts" }
}
},
"reportDocument": {
"type": "object",
"additionalProperties": false,
"required": ["schemaVersion", "meta", "summary", "groups"],
"properties": {
"schemaVersion": { "type": "string" },
"meta": { "$ref": "#/$defs/meta" },
"summary": { "$ref": "#/$defs/summary" },
"groups": { "type": "array", "items": { "$ref": "#/$defs/group" } }
}
},
"errorDocument": {
"type": "object",
"additionalProperties": false,
"required": ["schemaVersion", "error"],
"properties": {
"schemaVersion": { "type": "string" },
"error": { "type": "string" }
}
}
}
}