forked from ChelseaKR/tods-validate
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreport.schema.json
More file actions
112 lines (112 loc) · 4.41 KB
/
Copy pathreport.schema.json
File metadata and controls
112 lines (112 loc) · 4.41 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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/ChelseaKR/tods-validate/main/docs/report.schema.json",
"title": "tods-validate JSON report",
"description": "Output of `tods-validate validate --format json`. Stable: fields are only added, never removed or renamed, within a major version.",
"type": "object",
"required": ["validator", "specVersion", "source", "summary", "findings"],
"properties": {
"validator": { "const": "tods-validate" },
"toolVersion": {
"type": "string",
"description": "Version of tods-validate that produced the report."
},
"reportVersion": {
"type": "string",
"description": "Version of this report schema. Fields are only added within a major version."
},
"specVersion": {
"type": "string",
"description": "TODS specification version the rules implement."
},
"source": {
"type": "string",
"description": "The path that was validated, as given on the command line."
},
"summary": {
"type": "object",
"required": ["errors", "warnings", "infos"],
"properties": {
"errors": { "type": "integer", "minimum": 0 },
"warnings": { "type": "integer", "minimum": 0 },
"infos": { "type": "integer", "minimum": 0 },
"byRule": {
"type": "object",
"description": "Count of findings per rule ID, most frequent first.",
"additionalProperties": { "type": "integer", "minimum": 1 }
}
},
"additionalProperties": false
},
"findings": {
"type": "array",
"items": {
"type": "object",
"required": ["rule_id", "severity", "file", "row", "field", "location", "data", "message", "suggestion", "caused_by"],
"properties": {
"rule_id": { "type": "string", "pattern": "^TODS-[EWI][0-9]{3}$" },
"severity": { "enum": ["ERROR", "WARNING", "INFO"] },
"file": { "type": ["string", "null"] },
"row": {
"type": ["integer", "null"],
"minimum": 1,
"description": "1-based line number; the header row is line 1."
},
"field": { "type": ["string", "null"] },
"location": {
"type": ["string", "null"],
"description": "Stable machine location identifier, e.g. 'run_events.txt#L4/end_time'."
},
"data": {
"type": ["object", "null"],
"description": "Machine-readable context for this finding, such as the offending value or referenced ID.",
"additionalProperties": { "type": "string" }
},
"message": { "type": "string" },
"suggestion": { "type": ["string", "null"] },
"caused_by": {
"type": ["string", "null"],
"description": "Location identifier (see 'location') of the root finding that structurally caused this one, e.g. a TODS-E104 ragged row that left this field blank. Null when this finding is not a known downstream echo of another."
}
},
"additionalProperties": false
}
},
"coverage": {
"type": "object",
"description": "Validation-assurance manifest: which rules ran versus were skipped and why. Added in report schema 1.2.0.",
"required": ["total", "ran", "skipped", "skippedByReason", "rules"],
"properties": {
"total": { "type": "integer", "minimum": 0 },
"ran": { "type": "integer", "minimum": 0 },
"skipped": { "type": "integer", "minimum": 0 },
"skippedByReason": {
"type": "object",
"description": "Rule IDs skipped, keyed by status (e.g. 'skipped:needs_gtfs').",
"additionalProperties": {
"type": "array",
"items": { "type": "string" }
}
},
"rules": {
"type": "array",
"items": {
"type": "object",
"required": ["id", "severity", "category", "status"],
"properties": {
"id": { "type": "string" },
"severity": { "enum": ["ERROR", "WARNING", "INFO"] },
"category": { "type": "string" },
"status": {
"enum": ["ran", "skipped:needs_gtfs", "skipped:disabled", "skipped:ignored"]
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}