Skip to content

fix(ipa): relax itemsPerPage validation to require default > 1 for IPA-110#1186

Draft
andmatei wants to merge 2 commits intomainfrom
CLOUDP-330703
Draft

fix(ipa): relax itemsPerPage validation to require default > 1 for IPA-110#1186
andmatei wants to merge 2 commits intomainfrom
CLOUDP-330703

Conversation

@andmatei
Copy link
Collaborator

Summary

  • Changes the xgen-IPA-110-collections-request-has-itemsPerPage-query-param rule to accept any itemsPerPage default value greater than 1, instead of requiring exactly 100
  • Extends checkPaginationQueryParameterAndReturnErrors to support a { min: N } constraint in addition to the existing exact-value check (preserving pageNum behaviour)
  • Adds test cases for valid non-100 defaults (e.g. 2, 50) and updates invalid cases to cover the boundary value of 1

Jira: CLOUDP-330703

Test plan

  • Existing tests for pageNum still pass (exact-value check unchanged)
  • New valid cases pass: default: 2, default: 50
  • Invalid cases fail with correct message: default: 0, default: 1
  • Exception case still passes

Generated with Claude Code

Instead of enforcing an exact default of 100, the rule now accepts any
default value greater than 1, allowing APIs to define their own
reasonable page sizes.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@andmatei andmatei changed the title fix(IPA-110): relax itemsPerPage validation to require default > 1 fix(ipa): relax itemsPerPage validation to require default > 1 for IPA-110 Mar 18, 2026
Replace the mixed number|{min} parameter type with a consistent
object shape: { value: N } for exact match, { min: N } for range check.

Co-Authored-By: Claude Code <noreply@anthropic.com>
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