Add backup restore contracts
API checks / checks (push) Canceled after 0s
API dependency and security checks / audit (push) Canceled after 0s

This commit is contained in:
2026-10-25 05:55:15 +01:00
parent bb9b00295f
commit 97ae23e1f2
4 changed files with 39 additions and 0 deletions
+4
View File
@@ -23,3 +23,7 @@ Guest Star channel settings are described by
token is a server-to-authenticated-client value and fixtures use a synthetic
placeholder only.
Destructive backup recovery uses the explicit `backup-restore-request.json`
and `backup-restore-response.json` contracts; test fixtures contain no real
database paths or credentials.
+17
View File
@@ -0,0 +1,17 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://trixie.local/contracts/v1/backup-restore-request.json",
"title": "Backup restore request",
"type": "object",
"required": ["filename", "confirmation"],
"properties": {
"filename": {
"type": "string",
"pattern": "^trixie-[A-Za-z0-9T_.-]+\\.dump$",
"maxLength": 128
},
"confirmation": { "const": "RESTORE" },
"emergency_override": { "type": "boolean", "default": false }
},
"additionalProperties": false
}
+13
View File
@@ -0,0 +1,13 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://trixie.local/contracts/v1/backup-restore-response.json",
"title": "Backup restore response",
"type": "object",
"required": ["status", "filename", "reason"],
"properties": {
"status": { "type": "string", "enum": ["ok", "failed"] },
"filename": { "type": "string" },
"reason": { "type": ["string", "null"] }
},
"additionalProperties": false
}
+5
View File
@@ -0,0 +1,5 @@
{
"status": "ok",
"filename": "trixie-20261025T030000Z.dump",
"reason": null
}