Skip to content

Commit 9516fae

Browse files
committed
First version of the JSON schema for proposal/storage
1 parent a3e1382 commit 9516fae

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$id": "https://github.com/openSUSE/agama/blob/master/rust/share/proposal.storage.schema.json",
4+
"title": "Proposal",
5+
"description": "API description of the storage proposal.",
6+
"type": "object",
7+
"additionalProperties": false,
8+
"properties": {
9+
"devices": {
10+
"description": "Expected layout of the system after the commit phase.",
11+
"type": "array",
12+
"items": { "$ref": "device.storage.schema.json" }
13+
},
14+
"actions": {
15+
"description": "Sorted list of actions to execute during the commit phase.",
16+
"type": "array",
17+
"items": { "$ref": "#/$defs/action" }
18+
}
19+
},
20+
"$defs": {
21+
"action": {
22+
"type": "object",
23+
"additionalProperties": false,
24+
"required": ["device", "text"],
25+
"properties": {
26+
"device": { "type": "integer" },
27+
"text": { "type": "string" },
28+
"subvol": { "type": "boolean" },
29+
"delete": { "type": "boolean" },
30+
"resize": { "type": "boolean" }
31+
}
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)