Release 2.8.0 (#4508)

This commit is contained in:
Kevin Papst
2024-01-03 00:28:35 +01:00
committed by GitHub
parent d8f89d9f3d
commit 8eeb9c120a
27 changed files with 409 additions and 407 deletions

View File

@@ -12,13 +12,13 @@ namespace App\API;
use App\API\Model\Plugin;
use App\API\Model\Version;
use App\Plugin\PluginManager;
use FOS\RestBundle\Controller\Annotations as Rest;
use FOS\RestBundle\View\View;
use FOS\RestBundle\View\ViewHandlerInterface;
use Nelmio\ApiDocBundle\Annotation\Model;
use Nelmio\ApiDocBundle\Annotation\Security as ApiSecurity;
use OpenApi\Attributes as OA;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
#[IsGranted('IS_AUTHENTICATED_REMEMBERED')]
@@ -33,7 +33,7 @@ final class StatusController extends BaseApiController
* A testing route for the API
*/
#[OA\Response(response: 200, description: "A simple route that returns a 'pong', which you can use for testing the API", content: new OA\JsonContent(example: "{'message': 'pong'}"))]
#[Rest\Get(path: '/ping')]
#[Route(methods: ['GET'], path: '/ping')]
#[ApiSecurity(name: 'apiUser')]
#[ApiSecurity(name: 'apiToken')]
public function pingAction(): Response
@@ -47,7 +47,7 @@ final class StatusController extends BaseApiController
* 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')]
#[Route(methods: ['GET'], path: '/version')]
#[ApiSecurity(name: 'apiUser')]
#[ApiSecurity(name: 'apiToken')]
public function versionAction(): Response
@@ -59,7 +59,7 @@ final class StatusController extends BaseApiController
* 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')]
#[Route(methods: ['GET'], path: '/plugins')]
#[ApiSecurity(name: 'apiUser')]
#[ApiSecurity(name: 'apiToken')]
public function pluginAction(PluginManager $pluginManager): Response