feat(api): expand update_storage to support name, mount_path, host_path, content fields

Add support for updating additional storage fields via the API while
enforcing read-only restrictions for storages managed by docker-compose
or service definitions (only is_preview_suffix_enabled remains editable
for those).
This commit is contained in:
Andras Bacsai
2026-03-16 15:37:46 +01:00
parent 0488a188a0
commit 9d745fca75
3 changed files with 79 additions and 5 deletions
+19 -1
View File
@@ -3500,7 +3500,7 @@
}
],
"requestBody": {
"description": "Storage updated.",
"description": "Storage updated. For read-only storages (from docker-compose or services), only is_preview_suffix_enabled can be updated.",
"required": true,
"content": {
"application\/json": {
@@ -3525,6 +3525,24 @@
"is_preview_suffix_enabled": {
"type": "boolean",
"description": "Whether to add -pr-N suffix for preview deployments."
},
"name": {
"type": "string",
"description": "The volume name (persistent only, not allowed for read-only storages)."
},
"mount_path": {
"type": "string",
"description": "The container mount path (not allowed for read-only storages)."
},
"host_path": {
"type": "string",
"nullable": true,
"description": "The host path (persistent only, not allowed for read-only storages)."
},
"content": {
"type": "string",
"nullable": true,
"description": "The file content (file only, not allowed for read-only storages)."
}
},
"type": "object"