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

+250 -3
View File
@@ -4276,6 +4276,12 @@
"type": "object",
"properties": {}
}
},
"restoreSecrets": {
"type": "boolean"
},
"skipStackFiles": {
"type": "boolean"
}
},
"required": [
@@ -4343,6 +4349,37 @@
},
"targetEnvId": {
"type": "integer"
},
"environmentId": {
"type": "integer"
},
"mode": {
"type": "string"
},
"targetType": {
"type": "string"
},
"targetName": {
"type": "string"
},
"targetPath": {
"type": "string"
},
"volumeDestinations": {
"type": "object",
"properties": {}
},
"volumes": {
"type": "array",
"items": {
"type": "string"
}
},
"skipStackFiles": {
"type": "boolean"
},
"mergeStackFiles": {
"type": "boolean"
}
},
"required": [
@@ -4354,7 +4391,18 @@
"destinationId": 0,
"snapshotId": "string",
"includeTargets": true,
"targetEnvId": 0
"targetEnvId": 0,
"environmentId": 0,
"mode": "string",
"targetType": "string",
"targetName": "string",
"targetPath": "string",
"volumeDestinations": {},
"volumes": [
"string"
],
"skipStackFiles": true,
"mergeStackFiles": true
}
}
}
@@ -14954,7 +15002,23 @@
}
},
"security": [],
"description": "Public endpoint authenticated by the repository's webhook secret via `X-Hub-Signature-256` (GitHub) or `X-Gitlab-Token` (GitLab); the raw request body is used for HMAC verification. A secret is required by default; set ALLOW_WEBHOOKS_WITHOUT_SECRET=true to accept a secret-less trigger on an isolated network."
"description": "Public endpoint authenticated by the repository's webhook secret via `X-Hub-Signature-256` (GitHub) or `X-Gitlab-Token` (GitLab); the raw request body is used for HMAC verification. A secret is required by default; set ALLOW_WEBHOOKS_WITHOUT_SECRET=true to accept a secret-less trigger on an isolated network.",
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ref": {
"type": "string"
}
},
"description": "Fields auto-detected from the handler's destructuring of the request body - generic string type, no @openapi annotation for this body yet."
}
}
}
}
}
},
"/api/hawser/connect": {
@@ -23673,6 +23737,138 @@
},
"externalStackPaths": {
"type": "string"
},
"actionIconSize": {
"type": "string"
},
"compactPorts": {
"type": "boolean"
},
"confirmDestructive": {
"type": "boolean"
},
"dateFormat": {
"type": "string"
},
"defaultBackupImage": {
"type": "string"
},
"defaultComposeTemplate": {
"type": "string"
},
"defaultGrypeArgs": {
"type": "string"
},
"defaultGrypeImage": {
"type": "string"
},
"defaultScannerDns": {
"type": "array",
"items": {
"type": "string"
}
},
"defaultScannerNetworkMode": {
"type": "string"
},
"defaultTrivyArgs": {
"type": "string"
},
"defaultTrivyImage": {
"type": "string"
},
"downloadFormat": {
"type": "string"
},
"editorFont": {
"type": "string"
},
"eventCleanupCron": {
"type": "string"
},
"eventCleanupEnabled": {
"type": "boolean"
},
"eventCollectionMode": {
"type": "string"
},
"eventPollInterval": {
"type": "integer"
},
"eventRetentionDays": {
"type": "integer"
},
"font": {
"type": "string"
},
"fontSize": {
"type": "string"
},
"formatLogTimestamps": {
"type": "boolean"
},
"gridFontSize": {
"type": "string"
},
"highlightUpdates": {
"type": "boolean"
},
"honorProxyLabels": {
"type": "boolean"
},
"labelFilterMode": {
"type": "string"
},
"logMaxLines": {
"type": "integer"
},
"metricsCollectionInterval": {
"type": "integer"
},
"primaryStackLocation": {
"type": "string"
},
"protectScannerImages": {
"type": "boolean"
},
"scannerCleanupCron": {
"type": "string"
},
"scannerCleanupEnabled": {
"type": "boolean"
},
"scheduleCleanupCron": {
"type": "string"
},
"scheduleCleanupEnabled": {
"type": "boolean"
},
"scheduleRetentionDays": {
"type": "integer"
},
"showExposedPorts": {
"type": "boolean"
},
"showGitCommitHash": {
"type": "boolean"
},
"showImageChangelogLinks": {
"type": "boolean"
},
"showStoppedContainers": {
"type": "boolean"
},
"showWhatsNew": {
"type": "boolean"
},
"terminalFont": {
"type": "string"
},
"timeFormat": {
"type": "string"
},
"useSelfhstIcons": {
"type": "boolean"
}
}
},
@@ -23684,7 +23880,52 @@
"darkTheme": "string",
"defaultTimezone": "string",
"logBufferSizeKb": 0,
"externalStackPaths": "string"
"externalStackPaths": "string",
"actionIconSize": "string",
"compactPorts": true,
"confirmDestructive": true,
"dateFormat": "string",
"defaultBackupImage": "string",
"defaultComposeTemplate": "string",
"defaultGrypeArgs": "string",
"defaultGrypeImage": "string",
"defaultScannerDns": [
"string"
],
"defaultScannerNetworkMode": "string",
"defaultTrivyArgs": "string",
"defaultTrivyImage": "string",
"downloadFormat": "string",
"editorFont": "string",
"eventCleanupCron": "string",
"eventCleanupEnabled": true,
"eventCollectionMode": "string",
"eventPollInterval": 0,
"eventRetentionDays": 0,
"font": "string",
"fontSize": "string",
"formatLogTimestamps": true,
"gridFontSize": "string",
"highlightUpdates": true,
"honorProxyLabels": true,
"labelFilterMode": "string",
"logMaxLines": 0,
"metricsCollectionInterval": 0,
"primaryStackLocation": "string",
"protectScannerImages": true,
"scannerCleanupCron": "string",
"scannerCleanupEnabled": true,
"scheduleCleanupCron": "string",
"scheduleCleanupEnabled": true,
"scheduleRetentionDays": 0,
"showExposedPorts": true,
"showGitCommitHash": true,
"showImageChangelogLinks": true,
"showStoppedContainers": true,
"showWhatsNew": true,
"terminalFont": "string",
"timeFormat": "string",
"useSelfhstIcons": true
}
}
}
@@ -23978,6 +24219,12 @@
},
"envId": {
"type": "integer"
},
"grypeImage": {
"type": "string"
},
"trivyImage": {
"type": "string"
}
}
},
+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
@@ -11,7 +11,7 @@ import { jobResult } from '$lib/server/sse';
* @openapi
* summary: Preview what a restore would write (resolved targets + volume/stack contents)
* description: With includeTargets it also resolves the concrete restore targets (host paths / volumes); without it, returns the metadata-only preview the initial modal load relies on.
* body: {destinationId:integer!, snapshotId:string!, includeTargets:boolean, targetEnvId:integer}
* body: {destinationId:integer!, snapshotId:string!, includeTargets:boolean, targetEnvId:integer, environmentId:integer, mode:string, targetType:string, targetName:string, targetPath:string, volumeDestinations:object, volumes:array<string>, skipStackFiles:boolean, mergeStackFiles:boolean}
* resp-200: object
* resp-200-desc: The snapshot preview, optionally with a resolved targets list
* resp-400: Missing required fields (destinationId, snapshotId)
+1 -1
View File
@@ -407,7 +407,7 @@ export const GET: RequestHandler = async ({ cookies }) => {
* @openapi
* summary: Update global general settings (all fields optional; only supplied keys are written)
* description: A large flat settings bag - theme/fonts, scanner defaults, cleanup schedules, event/metrics collection, editor options (e.g. editorIndentGuides), and more.
* body: {animateIcons:boolean, editorIndentGuides:boolean, coloredActionButtons:boolean, lightTheme:string, darkTheme:string, defaultTimezone:string, logBufferSizeKb:integer, externalStackPaths:string}
* body: {animateIcons:boolean, editorIndentGuides:boolean, coloredActionButtons:boolean, lightTheme:string, darkTheme:string, defaultTimezone:string, logBufferSizeKb:integer, externalStackPaths:string, actionIconSize:string, compactPorts:boolean, confirmDestructive:boolean, dateFormat:string, defaultBackupImage:string, defaultComposeTemplate:string, defaultGrypeArgs:string, defaultGrypeImage:string, defaultScannerDns:array<string>, defaultScannerNetworkMode:string, defaultTrivyArgs:string, defaultTrivyImage:string, downloadFormat:string, editorFont:string, eventCleanupCron:string, eventCleanupEnabled:boolean, eventCollectionMode:string, eventPollInterval:integer, eventRetentionDays:integer, font:string, fontSize:string, formatLogTimestamps:boolean, gridFontSize:string, highlightUpdates:boolean, honorProxyLabels:boolean, labelFilterMode:string, logMaxLines:integer, metricsCollectionInterval:integer, primaryStackLocation:string, protectScannerImages:boolean, scannerCleanupCron:string, scannerCleanupEnabled:boolean, scheduleCleanupCron:string, scheduleCleanupEnabled:boolean, scheduleRetentionDays:integer, showExposedPorts:boolean, showGitCommitHash:boolean, showImageChangelogLinks:boolean, showStoppedContainers:boolean, showWhatsNew:boolean, terminalFont:string, timeFormat:string, useSelfhstIcons:boolean}
* resp-403: Permission denied (needs settings:edit)
* resp-500: Failed to save settings
*/
+1 -1
View File
@@ -92,7 +92,7 @@ export const GET: RequestHandler = async ({ url, cookies }) => {
/**
* @openapi
* summary: Save the vulnerability-scanner settings for an environment
* body: {scanner:string, grypeArgs:string, trivyArgs:string, envId:integer}
* body: {scanner:string, grypeArgs:string, trivyArgs:string, envId:integer, grypeImage:string, trivyImage:string}
* body-example: {"scanner":"grype","grypeArgs":"-o json -v {image}","trivyArgs":"image --format json {image}","envId":1}
* resp-200: {success:boolean!, settings:{scanner:string!, grypeArgs:string!, trivyArgs:string!}}
* resp-400: Invalid scanner type (must be none, grype, trivy or both)