Add backup restore contracts
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"status": "ok",
|
||||
"filename": "trixie-20261025T030000Z.dump",
|
||||
"reason": null
|
||||
}
|
||||
Reference in New Issue
Block a user