automationMapper = $automationMapper; $this->duplicateController = $duplicateController; } public function handle(Request $request): Response { $automationId = intval($request->getParam('id')); $duplicate = $this->duplicateController->duplicateAutomation($automationId); return new Response($this->automationMapper->buildAutomation($duplicate)); } public static function getRequestSchema(): array { return [ 'id' => Builder::integer()->required(), ]; } }