From 7c0cb2f59d0e71df3a4f0c39c94b3db97f233f45 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Sat, 10 Jan 2026 22:44:52 +0100 Subject: [PATCH] fix(api): deprecate applications compose endpoint - this endpoint is a duplicate of the services endpoint and also updates fields that do not exist which makes it unstable --- app/Http/Controllers/Api/ApplicationsController.php | 8 ++++++-- routes/api.php | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/ApplicationsController.php b/app/Http/Controllers/Api/ApplicationsController.php index b1ca08051..a08143022 100644 --- a/app/Http/Controllers/Api/ApplicationsController.php +++ b/app/Http/Controllers/Api/ApplicationsController.php @@ -847,11 +847,15 @@ public function create_dockerimage_application(Request $request) return $this->create_application($request, 'dockerimage'); } + /** + * @deprecated Use POST /api/v1/services instead. This endpoint creates a Service, not an Application and is an unstable duplicate of POST /api/v1/services. + */ #[OA\Post( - summary: 'Create (Docker Compose)', - description: 'Create new application based on a docker-compose file.', + summary: 'Create (Docker Compose) (Deprecated)', + description: 'Create new application based on a docker-compose file (without git).', path: '/applications/dockercompose', operationId: 'create-dockercompose-application', + deprecated: true, security: [ ['bearerAuth' => []], ], diff --git a/routes/api.php b/routes/api.php index aaf7d794b..8ff1fd1cc 100644 --- a/routes/api.php +++ b/routes/api.php @@ -103,6 +103,10 @@ Route::post('/applications/private-deploy-key', [ApplicationsController::class, 'create_private_deploy_key_application'])->middleware(['api.ability:write']); Route::post('/applications/dockerfile', [ApplicationsController::class, 'create_dockerfile_application'])->middleware(['api.ability:write']); Route::post('/applications/dockerimage', [ApplicationsController::class, 'create_dockerimage_application'])->middleware(['api.ability:write']); + + /** + * @deprecated Use POST /api/v1/services instead. This endpoint creates a Service, not an Application and is a unstable duplicate of POST /api/v1/services. + */ Route::post('/applications/dockercompose', [ApplicationsController::class, 'create_dockercompose_application'])->middleware(['api.ability:write']); Route::get('/applications/{uuid}', [ApplicationsController::class, 'application_by_uuid'])->middleware(['api.ability:read']);