updateController = $updateController; $this->automationMapper = $automationMapper; } public function handle(Request $request): Response { $data = $request->getParams(); $automation = $this->updateController->updateAutomation(intval($request->getParam('id')), $data); return new Response($this->automationMapper->buildAutomation($automation)); } public static function getRequestSchema(): array { return [ 'id' => Builder::integer()->required(), 'name' => Builder::string()->minLength(1), 'status' => Builder::string(), 'steps' => AutomationSchema::getStepsSchema(), 'meta' => Builder::object(), ]; } }