Skip to content

fix: add pagination to GET /api/releases endpoint (apn-0d1oa.8)#439

Merged
paulvanbrenk merged 2 commits intomainfrom
fix/apn-0d1oa.8-openapi
Feb 26, 2026
Merged

fix: add pagination to GET /api/releases endpoint (apn-0d1oa.8)#439
paulvanbrenk merged 2 commits intomainfrom
fix/apn-0d1oa.8-openapi

Conversation

@paulvanbrenk
Copy link
Collaborator

Summary

  • Fixes P1 bug: GET /api/releases had no pagination or result limit
  • Adds limit/offset pagination, returns PaginatedResponseOfReleaseDto
  • Also fixes OpenAPI spec ordering (schema alphabetically sorted to match CI)

Issue

Closes apn-0d1oa.8

What changed from PR #434

PR #434 was closed because PaginatedResponseOfReleaseDto was placed at the wrong alphabetical position in openapi.json. This PR sorts all component schemas alphabetically to match CI's generated output.

Test plan

  • 425/425 backend tests pass (dotnet test PatchNotes.slnx)
  • Frontend build passes (pnpm build)

🤖 Generated with Claude Code

paulvanbrenk and others added 2 commits February 25, 2026 21:47
The endpoint previously had no Take() call, allowing large days values to
load all releases (including full markdown Body) into memory.

- Add limit/offset query params (limit clamped 1-100, default 20)
- Return PaginatedResponse<ReleaseDto> with items, total, limit, offset
- Update openapi.json and regenerate frontend types via orval
- Update hooks.ts to extract .items from paginated response
- Update MSW mock handler and hooks.test.tsx for new response shape
- Update ReleasesApiTests.cs to assert against .items property

Closes apn-0d1oa.8

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…pn-0d1oa.8)

PaginatedResponseOfReleaseDto was placed at the wrong position in the
schemas object. CI generates schemas in alphabetical order; reorder to
match so the spec check passes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@paulvanbrenk paulvanbrenk force-pushed the fix/apn-0d1oa.8-openapi branch from aca254d to 2b3b7a1 Compare February 26, 2026 02:47
@paulvanbrenk paulvanbrenk merged commit 20313e6 into main Feb 26, 2026
4 checks passed
@paulvanbrenk paulvanbrenk deleted the fix/apn-0d1oa.8-openapi branch February 26, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant