feat(api): require POST for state-changing endpoints

Make start/stop/restart, deploy, enable/disable, and server validate
POST-only, with GET returning 405. Server validate accepts optional
install and uses ValidateAndInstallServerJob. Update OpenAPI and tests.
This commit is contained in:
Andras Bacsai
2026-07-19 11:42:04 +02:00
parent e2c2180f4f
commit 0633b543ee
16 changed files with 297 additions and 605 deletions
@@ -3849,9 +3849,9 @@ class ApplicationsController extends Controller
]);
}
#[OA\Get(
#[OA\Post(
summary: 'Start',
description: 'Start application. `Post` request is also accepted.',
description: 'Start application.',
path: '/applications/{uuid}/start',
operationId: 'start-application-by-uuid',
security: [
@@ -3973,9 +3973,9 @@ class ApplicationsController extends Controller
);
}
#[OA\Get(
#[OA\Post(
summary: 'Stop',
description: 'Stop application. `Post` request is also accepted.',
description: 'Stop application.',
path: '/applications/{uuid}/stop',
operationId: 'stop-application-by-uuid',
security: [
@@ -4066,9 +4066,9 @@ class ApplicationsController extends Controller
);
}
#[OA\Get(
#[OA\Post(
summary: 'Restart',
description: 'Restart application. `Post` request is also accepted.',
description: 'Restart application.',
path: '/applications/{uuid}/restart',
operationId: 'restart-application-by-uuid',
security: [