registry = $registry; } public function handle(Request $request): Response { $category = $request->getParam('category'); $templates = array_values($this->registry->getTemplates($category ? strval($category) : null)); return new Response(array_map(function (AutomationTemplate $automation) { return $automation->toArray(); }, $templates)); } public static function getRequestSchema(): array { return [ 'category' => Builder::string(), ]; } }