Skip to content

feat: enforce pagination bounds and document payments OpenAPI - #1338

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
oladev2026-tech:feat/openapi-payments-and-pagination-bounds
Aug 26, 2026
Merged

feat: enforce pagination bounds and document payments OpenAPI#1338
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
oladev2026-tech:feat/openapi-payments-and-pagination-bounds

Conversation

@oladev2026-tech

Copy link
Copy Markdown
Contributor

Summary

This PR enforces pagination bounds on two list endpoints and completes OpenAPI documentation on the payments controllers.

  • Analytics — introduces a validated GetEventsQueryDto (@IsInt/@Min/@Max) and applies it to GET /analytics/events. The page size is bounded to MAX_PAGE_SIZE, a sane default is applied when omitted, and invalid values (negative, zero, non-numeric, over-max) are rejected with 400 via the global ValidationPipe — the endpoint can no longer be asked to return an unbounded number of rows.
  • Gamification — adds a LeaderboardPaginationDto with the same bounds and applies it to GET /gamification/leaderboard, replacing the previously unbounded ParseIntPipe query params.
  • Invoices — adds @ApiTags, @ApiOperation, @ApiParam and @ApiResponse (success + typed 404) to both handlers, which previously had no OpenAPI annotations.
  • Payouts — fills in the missing 400/403/404/409 response annotations.

Default and maximum page sizes are sourced from the documented APP_CONSTANTS (DEFAULT_PAGE_SIZE/MAX_PAGE_SIZE) rather than magic numbers.

Testing

  • pnpm run typecheck
  • pnpm run lint:ci
  • pnpm run build

Issues

Closes #1311
Closes #1310
Closes #1308
Closes #1307

- analytics: add validated GetEventsQueryDto (IsInt/Min/Max) bounding the
  events list page size to MAX_PAGE_SIZE; invalid values now 400
- gamification: add LeaderboardPaginationDto bounding leaderboard page size;
  replaces the unbounded ParseIntPipe params
- invoices: add @ApiTags/@ApiOperation/@apiresponse and typed error docs
- payouts: fill in missing 400/403/404/409 response annotations
@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@oladev2026-tech Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project

@RUKAYAT-CODER
RUKAYAT-CODER merged commit 08e27d8 into rinafcode:main Aug 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants