fix(api): add docker_cleanup parameter to stop endpoints

Add optional docker_cleanup query parameter to the stop endpoints for
Services, Applications, and Databases. This allows API users to control
whether docker cleanup (pruning networks, volumes, etc.) is performed
when stopping resources.

The parameter defaults to true for backward compatibility.

API Usage:
- Stop without docker cleanup: GET /api/v1/{resource}/{uuid}/stop?docker_cleanup=false
- Stop with docker cleanup (default): GET /api/v1/{resource}/{uuid}/stop

Fixes #7758

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Andras Bacsai <andrasbacsai@users.noreply.github.com>
This commit is contained in:
claude[bot]
2026-01-01 12:03:13 +00:00
co-authored by Andras Bacsai
parent f6a59fa2dc
commit 21a7f2f581
3 changed files with 35 additions and 3 deletions
@@ -3250,6 +3250,15 @@ class ApplicationsController extends Controller
format: 'uuid',
)
),
new OA\Parameter(
name: 'docker_cleanup',
in: 'query',
description: 'Perform docker cleanup (prune networks, volumes, etc.).',
schema: new OA\Schema(
type: 'boolean',
default: true,
)
),
],
responses: [
new OA\Response(
@@ -3298,7 +3307,8 @@ class ApplicationsController extends Controller
$this->authorize('deploy', $application);
StopApplication::dispatch($application);
$dockerCleanup = $request->boolean('docker_cleanup', true);
StopApplication::dispatch($application, false, $dockerCleanup);
return response()->json(
[