Skip to content

feat: reject page sizes above the maximum - #12

Merged
DrSkillIssue merged 1 commit into
mainfrom
remove-pagesize-clamp
Aug 21, 2026
Merged

DrSkillIssue merged 1 commit into
mainfrom
remove-pagesize-clamp

Conversation

@DrSkillIssue

Copy link
Copy Markdown
Owner

Summary

The request-driven PaginateAsync overloads reject a request.PageSize above
maxPageSize with BadHttpRequestException (status 400), replacing the silent
clamp. JSON:API cursor pagination profile: "If page[size] exceeds the
server-defined max page size, the server MUST respond according to the rules
for the max page size exceeded error."

Behavior

Input Before After
pageSize within maxPageSize honored honored
pageSize above maxPageSize clamped to maxPageSize, 200 400

The fluent builder's MaxPageSize and ExecutionOptions.MaxPageSize keep
their documented developer-facing clamp; core is unchanged.

Breaking

Requests with an oversized pageSize previously returned a clamped 200 page
and now return 400. Version bumped to 3.2.0.

The request-driven PaginateAsync overloads throw BadHttpRequestException
when request.PageSize exceeds maxPageSize, replacing the silent clamp.
The fluent builder's MaxPageSize and ExecutionOptions keep their clamp.
Bump the version to 3.2.0.
@DrSkillIssue
DrSkillIssue merged commit 0f19bfb into main Aug 21, 2026
4 checks passed
@DrSkillIssue
DrSkillIssue deleted the remove-pagesize-clamp branch August 21, 2026 22:14
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