pagination
Installation
SKILL.md
Pagination
What the module already decided
Three query parameters, one shape, everywhere:
| Parameter | Default | Notes |
|---|---|---|
?page |
0 |
Zero-based. Negatives clamp to 0. |
?pageSize |
10 |
Clamped to 1..100. |
?sortBy |
none | name,-createdAt — a - prefix means descending. |
Parsing never fails. ?page=abc falls back to the default, ?page=-3 becomes 0, and
?pageSize=5000 becomes 100. That is a deliberate stance: paging parameters are navigation, not data, and a client that fumbles one wants the first
page rather than a 400 it has to handle. It also means there is no error path to write in the route — do not add one.
Different bounds for one endpoint: