Repository navigation
Expand file tree
/
Copy pathcommand.schema.json
More file actions
75 lines (74 loc) · 2.45 KB
/
Copy pathcommand.schema.json
File metadata and controls
75 lines (74 loc) · 2.45 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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "command.schema.json",
"title": "Integration Protocol 1.0 command payload",
"oneOf": [
{ "$ref": "#/$defs/openDocument" },
{ "$ref": "#/$defs/replaceDocument" },
{ "$ref": "#/$defs/updateAttention" },
{ "$ref": "#/$defs/requestCheck" },
{ "$ref": "#/$defs/performAction" },
{ "$ref": "#/$defs/completeApply" },
{ "$ref": "#/$defs/closeDocument" }
],
"$defs": {
"openDocument": {
"type": "object",
"required": ["type", "snapshot"],
"properties": {
"type": { "const": "openDocument" },
"snapshot": { "$ref": "shared.schema.json#/$defs/documentSnapshot" }
}
},
"replaceDocument": {
"type": "object",
"required": ["type", "snapshot"],
"properties": {
"type": { "const": "replaceDocument" },
"snapshot": { "$ref": "shared.schema.json#/$defs/documentSnapshot" }
}
},
"updateAttention": {
"type": "object",
"required": ["type", "revision", "attention"],
"properties": {
"type": { "const": "updateAttention" },
"revision": { "$ref": "shared.schema.json#/$defs/identifier" },
"attention": { "$ref": "shared.schema.json#/$defs/writingAttention" }
}
},
"requestCheck": {
"type": "object",
"required": ["type", "revision"],
"properties": {
"type": { "const": "requestCheck" },
"revision": { "$ref": "shared.schema.json#/$defs/identifier" },
"intent": { "$ref": "shared.schema.json#/$defs/checkIntent" }
}
},
"performAction": {
"type": "object",
"required": ["type", "actionId", "kind", "suggestion"],
"properties": {
"type": { "const": "performAction" },
"actionId": { "$ref": "shared.schema.json#/$defs/identifier" },
"kind": { "enum": ["apply", "dismiss", "explain", "report"] },
"suggestion": { "$ref": "shared.schema.json#/$defs/suggestionReference" }
}
},
"completeApply": {
"type": "object",
"required": ["type", "transactionId", "outcome"],
"properties": {
"type": { "const": "completeApply" },
"transactionId": { "$ref": "shared.schema.json#/$defs/identifier" },
"outcome": { "$ref": "shared.schema.json#/$defs/applyOutcome" }
}
},
"closeDocument": {
"type": "object",
"required": ["type"],
"properties": { "type": { "const": "closeDocument" } }
}
}
}