Skip to content

Fix complaint voting Swagger docs and vote input handling

Giridhar Reddy requested to merge abc into main

This MR improves the complaint voting endpoint behavior and Swagger documentation.

Changes

Normalized vote input by trimming whitespace and converting it to lowercase. Kept valid vote values as up, down, and spam. Improved Swagger docs for POST /api/complaints/{id}/vote. Added clearer vote examples for upvote, downvote, and spam reporting. Documented the complaint ID as an existing UUID, instead of showing a misleading hard-coded example. Added missing 403 response documentation for restricted resident voting. Improved the 404 response message when a complaint ID does not exist. Validation

Ran backend syntax checks successfully:

Merge request reports

Loading