createAutomationFromTemplateController = $createAutomationFromTemplateController; $this->automationMapper = $automationMapper; } public function handle(Request $request): Response { $automation = $this->createAutomationFromTemplateController->createAutomation((string)$request->getParam('slug')); return new Response($this->automationMapper->buildAutomation($automation)); } public static function getRequestSchema(): array { return [ 'slug' => Builder::string()->required(), ]; } }