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
73 lines (73 loc) · 2.83 KB
/
Copy pathreport.schema.json
File metadata and controls
73 lines (73 loc) · 2.83 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
{
"$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", "message", "suggestion"],
"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'."
},
"message": { "type": "string" },
"suggestion": { "type": ["string", "null"] },
"data": {
"type": ["object", "null"],
"description": "Structured, machine-readable context (offending value, referenced ID, etc.) so consumers need not parse the message. Added in report schema 1.2.0.",
"additionalProperties": { "type": "string" }
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}