5050/**
5151 * @extends AbstractRestController<Contest, Contest>
5252 */
53- #[Rest \Route('/contests ' )]
53+ #[Rest \Route(path: '/contests ' )]
5454#[OA \Tag(name: 'Contests ' )]
5555#[OA \Parameter(ref: '#/components/parameters/strict ' )]
5656#[OA \Response(ref: '#/components/responses/InvalidResponse ' , response: 400 )]
@@ -76,7 +76,7 @@ public function __construct(
7676 * @throws BadRequestHttpException
7777 */
7878 #[IsGranted('ROLE_ADMIN ' )]
79- #[Rest \Post('' )]
79+ #[Rest \Post(path: '' )]
8080 #[OA \RequestBody(
8181 required: true ,
8282 content: new OA \MediaType (
@@ -126,7 +126,7 @@ public function addContestAction(Request $request): string
126126 * Get all the contests.
127127 * @throws NonUniqueResultException
128128 */
129- #[Rest \Get('' )]
129+ #[Rest \Get(path: '' )]
130130 #[OA \Response(
131131 response: 200 ,
132132 description: 'Returns all contests visible to the user (all contests for privileged users, active contests otherwise) ' ,
@@ -151,7 +151,7 @@ public function listAction(Request $request): Response
151151 * Get the given contest.
152152 * @throws NonUniqueResultException
153153 */
154- #[Rest \Get('/{cid} ' )]
154+ #[Rest \Get(path: '/{cid} ' )]
155155 #[OA \Response(
156156 response: 200 ,
157157 description: 'Returns the given contest ' ,
@@ -166,7 +166,7 @@ public function singleAction(Request $request, string $cid): Response
166166 /**
167167 * Get the banner for the given contest.
168168 */
169- #[Rest \Get('/{cid}/banner ' , name: 'contest_banner ' )]
169+ #[Rest \Get(path: '/{cid}/banner ' , name: 'contest_banner ' )]
170170 #[OA \Response(
171171 response: 200 ,
172172 description: 'Returns the given contest banner in PNG, JPG or SVG format ' ,
@@ -202,7 +202,7 @@ public function bannerAction(Request $request, string $cid): Response
202202 * Delete the banner for the given contest.
203203 */
204204 #[IsGranted('ROLE_ADMIN ' )]
205- #[Rest \Delete('/{cid}/banner ' , name: 'delete_contest_banner ' )]
205+ #[Rest \Delete(path: '/{cid}/banner ' , name: 'delete_contest_banner ' )]
206206 #[OA \Response(response: 204 , description: 'Deleting banner succeeded ' )]
207207 #[OA \Parameter(ref: '#/components/parameters/cid ' )]
208208 public function deleteBannerAction (Request $ request , string $ cid ): Response
@@ -270,7 +270,7 @@ public function setBannerAction(Request $request, string $cid, ValidatorInterfac
270270 * Delete the problemset document for the given contest.
271271 */
272272 #[IsGranted('ROLE_ADMIN ' )]
273- #[Rest \Delete('/{cid}/problemset ' , name: 'delete_contest_problemset ' )]
273+ #[Rest \Delete(path: '/{cid}/problemset ' , name: 'delete_contest_problemset ' )]
274274 #[OA \Response(response: 204 , description: 'Deleting problemset document succeeded ' )]
275275 #[OA \Parameter(ref: '#/components/parameters/cid ' )]
276276 public function deleteProblemsetAction (Request $ request , string $ cid ): Response
@@ -342,7 +342,7 @@ public function setProblemsetAction(Request $request, string $cid, ValidatorInte
342342 /**
343343 * Get the problemset document for the given contest.
344344 */
345- #[Rest \Get('/{cid}/problemset ' , name: 'contest_problemset ' )]
345+ #[Rest \Get(path: '/{cid}/problemset ' , name: 'contest_problemset ' )]
346346 #[OA \Response(
347347 response: 200 ,
348348 description: 'Returns the given contest problemset document in PDF, HTML or TXT format ' ,
@@ -386,7 +386,7 @@ public function problemsetAction(Request $request, string $cid): Response
386386 * @throws NonUniqueResultException
387387 */
388388 #[IsGranted('ROLE_API_WRITER ' )]
389- #[Rest \Patch('/{cid} ' )]
389+ #[Rest \Patch(path: '/{cid} ' )]
390390 #[OA \RequestBody(
391391 required: true ,
392392 content: new OA \MediaType (
@@ -498,7 +498,7 @@ public function changeStartTimeAction(
498498 * Get the contest in YAML format.
499499 * @throws NonUniqueResultException
500500 */
501- #[Rest \Get('/{cid}/contest-yaml ' )]
501+ #[Rest \Get(path: '/{cid}/contest-yaml ' )]
502502 #[OA \Parameter(ref: '#/components/parameters/cid ' )]
503503 #[OA \Response(
504504 response: 200 ,
@@ -525,7 +525,7 @@ public function getContestYamlAction(Request $request, string $cid): StreamedRes
525525 * Get the current contest state
526526 * @throws NonUniqueResultException
527527 */
528- #[Rest \Get('/{cid}/state ' )]
528+ #[Rest \Get(path: '/{cid}/state ' )]
529529 #[OA \Parameter(ref: '#/components/parameters/cid ' )]
530530 #[OA \Response(
531531 response: 200 ,
@@ -548,7 +548,7 @@ public function getContestStateAction(Request $request, string $cid): ContestSta
548548 * @throws NonUniqueResultException
549549 */
550550 #[IsGranted(new Expression ("is_granted('ROLE_JURY') or is_granted('ROLE_API_READER') " ))]
551- #[Rest \Get('/{cid}/event-feed ' )]
551+ #[Rest \Get(path: '/{cid}/event-feed ' )]
552552 #[OA \Parameter(ref: '#/components/parameters/cid ' )]
553553 #[OA \Parameter(
554554 name: 'since_id ' ,
@@ -914,7 +914,7 @@ public function getEventFeedAction(
914914 * @throws NonUniqueResultException
915915 */
916916 #[IsGranted('ROLE_API_READER ' )]
917- #[Rest \Get('/{cid}/status ' )]
917+ #[Rest \Get(path: '/{cid}/status ' )]
918918 #[OA \Parameter(ref: '#/components/parameters/cid ' )]
919919 #[OA \Response(
920920 response: 200 ,
@@ -926,7 +926,7 @@ public function getStatusAction(Request $request, string $cid): ContestStatus
926926 return $ this ->dj ->getContestStats ($ this ->getContestWithId ($ request , $ cid ));
927927 }
928928
929- #[Rest \Get('/{cid}/samples.zip ' , name: 'samples_data_zip ' )]
929+ #[Rest \Get(path: '/{cid}/samples.zip ' , name: 'samples_data_zip ' )]
930930 #[OA \Response(
931931 response: 200 ,
932932 description: 'The problem samples, statement & attachments as a ZIP archive ' ,
0 commit comments