'pong'], 200); return $this->viewHandler->handle($view); } /** * Returns information about the Kimai release */ #[OA\Response(response: 200, description: 'Returns version information about the current release', content: new OA\JsonContent(ref: new Model(type: Version::class)))] #[Rest\Get(path: '/version')] #[ApiSecurity(name: 'apiUser')] #[ApiSecurity(name: 'apiToken')] public function versionAction(): Response { return $this->viewHandler->handle(new View(new Version(), 200)); } /** * Returns information about installed Plugins */ #[OA\Response(response: 200, description: 'Returns a list of plugin names and versions', content: new OA\JsonContent(type: 'array', items: new OA\Items(ref: new Model(type: Plugin::class))))] #[Rest\Get(path: '/plugins')] #[ApiSecurity(name: 'apiUser')] #[ApiSecurity(name: 'apiToken')] public function pluginAction(PluginManager $pluginManager): Response { $plugins = []; foreach ($pluginManager->getPlugins() as $plugin) { $pluginManager->loadMetadata($plugin); $plugins[] = new Plugin($plugin); } return $this->viewHandler->handle(new View($plugins, 200)); } }