document all request-body fields in the openapi annotations

This commit is contained in:
Jarek Krochmalski committed 2026-09-06 17:38:22 +05:30
1 parent aa30a8dc0a
commit a78bd46578
6 files changed
+657 -61

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@ import { guardSnapshotEnvAccess } from '$lib/server/backups/route-guards';
* @openapi
* summary: Restore a backup snapshot in-place or to a new location, streaming progress as a Server-Sent Events job
* description: Returns a text/event-stream that emits `progress` events and a final `result` event. An in-place restore is destructive and requires confirmOverwrite:true. Authorization and snapshot-environment access are checked before the request shape is validated. destinationId from GET /api/backup/destinations. snapshotId from GET /api/backup/snapshots. environmentId from GET /api/environments.
* body: {destinationId:integer!, snapshotId:string!, mode:string, targetType:string, volumes:array<string>, environmentId:integer, confirmOverwrite:boolean, targetPath:string, targetName:string, postRestore:string, volumeDestinations:array<{}>}
* body: {destinationId:integer!, snapshotId:string!, mode:string, targetType:string, volumes:array<string>, environmentId:integer, confirmOverwrite:boolean, targetPath:string, targetName:string, postRestore:string, volumeDestinations:array<{}>, restoreSecrets:boolean, skipStackFiles:boolean}
* body-example: {"destinationId":3,"snapshotId":"a1b2c3d4","mode":"new-location","targetType":"container","targetName":"nextcloud-restored","environmentId":1,"confirmOverwrite":false}
* resp-200: Server-Sent Events stream of progress and a final result event (status "success" or "error")
* resp-400: Invalid restore request; the response "issues" array lists the validation problems