@@ -93,14 +93,14 @@ public function __construct
9393 in: "query " ,
9494 required: false ,
9595 schema: new OA \Schema (type: "string " ),
96- description: "Expand relationships "
96+ description: "Expand relationships: "
9797 ),
9898 ],
9999 responses: [
100100 new OA \Response (
101101 response: Response::HTTP_OK ,
102102 description: "Elections list retrieved successfully " ,
103- content: new OA \JsonContent (ref: "#/components/schemas/ElectionsList " )
103+ content: new OA \JsonContent (ref: "#/components/schemas/PaginatedElectionsResponse " )
104104 ),
105105 new OA \Response (response: Response::HTTP_BAD_REQUEST , description: "Bad Request " ),
106106 new OA \Response (response: Response::HTTP_PRECONDITION_FAILED , description: "Validation Error " ),
@@ -152,7 +152,7 @@ function ($page, $per_page, $filter, $order, $applyExtraFilters) {
152152 }
153153
154154 #[OA \Get(
155- path: "/api/v1/elections/current " ,
155+ path: "/api/public/ v1/elections/current " ,
156156 operationId: "getCurrentElection " ,
157157 description: "Get the current active election " ,
158158 tags: ["Elections (Public) " ],
@@ -252,7 +252,7 @@ public function getById($election_id)
252252 }
253253
254254 #[OA \Get(
255- path: "/api/v1/elections/current/candidates " ,
255+ path: "/api/public/ v1/elections/current/candidates " ,
256256 operationId: "getCurrentElectionCandidates " ,
257257 description: "Get all accepted candidates for the current election. Supports expand parameter to include member and/or election objects " ,
258258 tags: ["Elections (Public) " ],
@@ -297,7 +297,7 @@ public function getById($election_id)
297297 new OA \Response (
298298 response: Response::HTTP_OK ,
299299 description: "Current election candidates retrieved successfully " ,
300- content: new OA \JsonContent (ref: "#/components/schemas/CandidatesList " )
300+ content: new OA \JsonContent (ref: "#/components/schemas/PaginatedCandidatesResponse " )
301301 ),
302302 new OA \Response (response: Response::HTTP_NOT_FOUND , description: "No current election found " ),
303303 new OA \Response (response: Response::HTTP_INTERNAL_SERVER_ERROR , description: "Server Error " ),
@@ -405,7 +405,7 @@ function ($page, $per_page, $filter, $order, $applyExtraFilters) use ($election)
405405 new OA \Response (
406406 response: Response::HTTP_OK ,
407407 description: "Election candidates retrieved successfully " ,
408- content: new OA \JsonContent (ref: "#/components/schemas/CandidatesList " )
408+ content: new OA \JsonContent (ref: "#/components/schemas/PaginatedCandidatesResponse " )
409409 ),
410410 new OA \Response (response: Response::HTTP_NOT_FOUND , description: "Election not found " ),
411411 new OA \Response (response: Response::HTTP_INTERNAL_SERVER_ERROR , description: "Server Error " ),
@@ -460,7 +460,7 @@ function ($page, $per_page, $filter, $order, $applyExtraFilters) use ($election)
460460 }
461461
462462 #[OA \Get(
463- path: "/api/v1/elections/current/candidates/gold " ,
463+ path: "/api/public/ v1/elections/current/candidates/gold " ,
464464 operationId: "getCurrentGoldCandidates " ,
465465 description: "Get all gold (featured) candidates for the current election. Supports expand parameter to include member and/or election objects " ,
466466 tags: ["Elections (Public) " ],
@@ -505,7 +505,7 @@ function ($page, $per_page, $filter, $order, $applyExtraFilters) use ($election)
505505 new OA \Response (
506506 response: Response::HTTP_OK ,
507507 description: "Gold candidates retrieved successfully " ,
508- content: new OA \JsonContent (ref: "#/components/schemas/CandidatesList " )
508+ content: new OA \JsonContent (ref: "#/components/schemas/PaginatedCandidatesResponse " )
509509 ),
510510 new OA \Response (response: Response::HTTP_NOT_FOUND , description: "No current election found " ),
511511 new OA \Response (response: Response::HTTP_INTERNAL_SERVER_ERROR , description: "Server Error " ),
@@ -613,7 +613,7 @@ function ($page, $per_page, $filter, $order, $applyExtraFilters) use ($election)
613613 new OA \Response (
614614 response: Response::HTTP_OK ,
615615 description: "Gold candidates retrieved successfully " ,
616- content: new OA \JsonContent (ref: "#/components/schemas/CandidatesList " )
616+ content: new OA \JsonContent (ref: "#/components/schemas/PaginatedCandidatesResponse " )
617617 ),
618618 new OA \Response (response: Response::HTTP_NOT_FOUND , description: "Election not found " ),
619619 new OA \Response (response: Response::HTTP_INTERNAL_SERVER_ERROR , description: "Server Error " ),
@@ -791,4 +791,4 @@ public function nominateCandidate(int $candidate_id)
791791
792792 });
793793 }
794- }
794+ }
0 commit comments