-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdrp.schema.json
More file actions
100 lines (100 loc) · 2.44 KB
/
Copy pathdrp.schema.json
File metadata and controls
100 lines (100 loc) · 2.44 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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/safal207/DRP/schema/drp.schema.json",
"title": "DRP Record",
"description": "Schema for a single DRP (Decision Record Protocol) record. A batch is a JSON array whose items match this schema. Graph-level invariants (uniqueness, reference resolution, bidirectional consistency, timestamp ordering) are enforced by the reference validator, not by this schema.",
"type": "object",
"additionalProperties": false,
"required": [
"record_id",
"timestamp",
"context",
"decision",
"options",
"status"
],
"properties": {
"record_id": {
"type": "string",
"minLength": 1,
"description": "Stable identifier, unique within a batch."
},
"timestamp": {
"type": "string",
"minLength": 1,
"description": "ISO 8601 UTC timestamp. Trailing 'Z' or explicit '+00:00' offset."
},
"context": {
"type": "string",
"minLength": 1,
"description": "Why the decision is being made."
},
"decision": {
"type": "string",
"minLength": 1,
"description": "What was decided."
},
"options": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
},
"description": "Options that were considered. Non-empty."
},
"status": {
"type": "string",
"enum": ["draft", "proposed", "complete", "superseded", "rejected"]
},
"rationale": {
"type": "string"
},
"impact": {
"description": "Exactly one of -1, 0, 1, null. Booleans are rejected.",
"type": ["integer", "null"],
"enum": [-1, 0, 1, null]
},
"parent_record_ids": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
},
"child_record_ids": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
},
"supersedes_record_id": {
"type": "string",
"minLength": 1
},
"tags": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"metadata": {
"type": "object"
}
},
"allOf": [
{
"if": {
"properties": { "status": { "const": "superseded" } },
"required": ["status"]
},
"then": {
"required": ["supersedes_record_id"]
}
}
]
}