diff --git a/API/ApprovalBundleApiController.php b/API/ApprovalBundleApiController.php index 35e4260..6d1edae 100644 --- a/API/ApprovalBundleApiController.php +++ b/API/ApprovalBundleApiController.php @@ -32,7 +32,7 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Symfony\Contracts\Translation\TranslatorInterface; -#[OA\Tag(name: 'ApprovalBundleApi')] +#[OA\Tag(name: 'ApprovalBundle')] final class ApprovalBundleApiController extends BaseApiController { public function __construct( @@ -53,7 +53,7 @@ public function __construct( #[OA\Response(response: 200, description: 'URL to submitted week')] #[Rest\QueryParam(name: 'user', requirements: '\d+', strict: true, nullable: true, description: 'User ID to get information for')] #[Rest\QueryParam(name: 'date', nullable: false, description: 'Date as monday of selected week: Y-m-d')] - #[Route(methods: ['POST'], path: '/add_to_approve')] + #[Route(methods: ['POST'], path: '/approval-bundle/add_to_approve')] public function submitWeekAction(Request $request): Response { $selectedUserId = $request->query->get('user'); diff --git a/API/ApprovalNextWeekApiController.php b/API/ApprovalNextWeekApiController.php index 79568f0..d27a872 100644 --- a/API/ApprovalNextWeekApiController.php +++ b/API/ApprovalNextWeekApiController.php @@ -22,7 +22,7 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Symfony\Contracts\Translation\TranslatorInterface; -#[OA\Tag(name: 'ApprovalNextWeekApi')] +#[OA\Tag(name: 'ApprovalBundle')] final class ApprovalNextWeekApiController extends BaseApiController { public function __construct( @@ -36,7 +36,7 @@ public function __construct( #[OA\Response(response: 200, description: 'Status of selected week')] #[Rest\QueryParam(name: 'user', requirements: '\d+', strict: true, nullable: true, description: 'User ID to get information for')] - #[Route(methods: ['GET'], path: '/next-week')] + #[Route(methods: ['GET'], path: '/approval-bundle/next-week')] public function nextWeekAction(Request $request): Response { $selectedUserId = $request->query->get('user'); diff --git a/API/ApprovalOvertimeController.php b/API/ApprovalOvertimeController.php index 82eb8e1..b4b6049 100644 --- a/API/ApprovalOvertimeController.php +++ b/API/ApprovalOvertimeController.php @@ -24,7 +24,7 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Symfony\Contracts\Translation\TranslatorInterface; -#[OA\Tag(name: 'ApprovalBundleApi')] +#[OA\Tag(name: 'ApprovalBundle')] final class ApprovalOvertimeController extends BaseApiController { public function __construct( @@ -40,7 +40,7 @@ public function __construct( #[OA\Response(response: 200, description: 'Get overtime for that year')] #[Rest\QueryParam(name: 'user', requirements: '\d+', strict: true, nullable: true, description: 'User ID to get information for')] #[Rest\QueryParam(name: 'date', nullable: false, description: 'Date to get overtime until/including this date: Y-m-d')] - #[Route(methods: ['GET'], path: '/overtime_year')] + #[Route(methods: ['GET'], path: '/approval-bundle/overtime_year')] public function overtimeForYearUntil(Request $request): Response { $selectedUserId = $request->query->get('user'); diff --git a/API/ApprovalOvertimeWeeklyController.php b/API/ApprovalOvertimeWeeklyController.php index ca9d906..f687310 100644 --- a/API/ApprovalOvertimeWeeklyController.php +++ b/API/ApprovalOvertimeWeeklyController.php @@ -24,7 +24,7 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Symfony\Contracts\Translation\TranslatorInterface; -#[OA\Tag(name: 'ApprovalBundleApi')] +#[OA\Tag(name: 'ApprovalBundle')] final class ApprovalOvertimeWeeklyController extends BaseApiController { public function __construct( @@ -40,7 +40,7 @@ public function __construct( #[OA\Response(response: 200, description: "Get weekly overtime overview for all weeks from 'date' and later")] #[Rest\QueryParam(name: 'user', requirements: '\d+', strict: true, nullable: true, description: 'User ID to get information for')] #[Rest\QueryParam(name: 'date', nullable: false, description: 'Date to get weekly overtime overview up from this date: Y-m-d')] - #[Route(methods: ['GET'], path: '/weekly_overtime')] + #[Route(methods: ['GET'], path: '/approval-bundle/weekly_overtime')] public function weeklyOvertime(Request $request): Response { $selectedUserId = $request->query->get('user'); diff --git a/API/ApprovalStatusApiController.php b/API/ApprovalStatusApiController.php index 7f43bae..3fcca12 100644 --- a/API/ApprovalStatusApiController.php +++ b/API/ApprovalStatusApiController.php @@ -25,7 +25,7 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Symfony\Contracts\Translation\TranslatorInterface; -#[OA\Tag(name: 'ApprovalStatusApi')] +#[OA\Tag(name: 'ApprovalBundle')] final class ApprovalStatusApiController extends BaseApiController { public function __construct( @@ -40,7 +40,7 @@ public function __construct( #[OA\Response(response: 200, description: 'Status of selected week')] #[Rest\QueryParam(name: 'user', requirements: '\d+', strict: true, nullable: true, description: 'User ID to get information for')] #[Rest\QueryParam(name: 'date', nullable: false, description: 'Date as monday of selected week: Y-m-d')] - #[Route(methods: ['GET'], path: '/week-status')] + #[Route(methods: ['GET'], path: '/approval-bundle/week-status')] public function submitWeekAction(Request $request): Response { $selectedUserId = $request->query->get('user'); diff --git a/CHANGELOG.md b/CHANGELOG.md index 5db84d0..8c90e14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 2.2.0 + +- **API endpoints changed** to support Kimai naming conventions +- All API endpoints contain additionally "/approval-bundle/" in as prefix - this is a breaking change, so if you have integrations, you need to update them - the "TimeKex" integration has been updated - use the latest release and update the configuration + ## 2.1.4 - fix: Break issue calculations had not been correct, when time entries had been in misorder, e.g. entered later times before earlier times, this is now fixed. diff --git a/composer.json b/composer.json index 7c54c1d..74205de 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "A Kimai plugin to manage approvals and supporting related API", "homepage": "https://www.kimai.org/store/katjaglass-approval-bundle.html", "type": "kimai-plugin", - "version": "2.1.3", + "version": "2.2.0", "keywords": [ "kimai", "kimai-plugin"