Skip to content

Commit 44cff43

Browse files
committed
spec(workstation): add WorkstationDoctorReport schema
1 parent 5206689 commit 44cff43

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://schemas.srcos.ai/v2/WorkstationDoctorReport.json",
4+
"title": "WorkstationDoctorReport",
5+
"description": "Typed health-report envelope emitted by the SourceOS workstation doctor surface.",
6+
"type": "object",
7+
"additionalProperties": false,
8+
"required": [
9+
"kind",
10+
"profile",
11+
"ok",
12+
"summary",
13+
"results"
14+
],
15+
"properties": {
16+
"kind": {
17+
"const": "sourceos.doctor",
18+
"description": "Compatibility discriminator emitted by the workstation doctor surface."
19+
},
20+
"profile": {
21+
"type": "string",
22+
"minLength": 1,
23+
"description": "Workstation profile identifier, such as linux-dev/workstation-v0."
24+
},
25+
"ok": {
26+
"type": "boolean",
27+
"description": "Overall doctor outcome."
28+
},
29+
"summary": {
30+
"type": "object",
31+
"additionalProperties": false,
32+
"required": ["ok", "warn", "error", "info"],
33+
"properties": {
34+
"ok": { "type": "integer", "minimum": 0 },
35+
"warn": { "type": "integer", "minimum": 0 },
36+
"error": { "type": "integer", "minimum": 0 },
37+
"info": { "type": "integer", "minimum": 0 }
38+
},
39+
"description": "Level counts across doctor checks."
40+
},
41+
"results": {
42+
"type": "array",
43+
"items": {
44+
"type": "object",
45+
"additionalProperties": false,
46+
"required": ["level", "name", "message"],
47+
"properties": {
48+
"level": {
49+
"type": "string",
50+
"enum": ["ok", "warn", "error", "info"]
51+
},
52+
"name": {
53+
"type": "string",
54+
"minLength": 1
55+
},
56+
"message": {
57+
"type": "string"
58+
}
59+
}
60+
},
61+
"description": "Per-check doctor results."
62+
}
63+
}
64+
}

0 commit comments

Comments
 (0)