Skip to content

test: decouple required parameter validation - #612

Open
razor-x wants to merge 1 commit into
mainfrom
fix/decouple-required-parameter-tests
Open

razor-x wants to merge 1 commit into
mainfrom
fix/decouple-required-parameter-tests

Conversation

@razor-x

@razor-x razor-x commented Nov 5, 2026

Copy link
Copy Markdown
Member

Summary

 generated route
-  inline at-least-one guard
+  Seam::RequestParameters.require_at_least_one(...)

 required parameter specs
-  mutable production endpoint schemas
+  fixed test request using the production validator and paginator

Extracts the smallest shared validator used by generated routes, then tests generic required-parameter and paginator behavior without depending on access_methods.list continuing to require a filter.

Evidence

  • Before: generic validation specs depended on the current access_methods.list schema.
    After: fixed test configuration covers empty and pagination-only rejection, filtered acceptance, rejection before requests, unpaginated validation, and all paginator entrypoints.
  • npm run typecheck — passed
  • Ruby syntax checks for the helper, spec, and all changed generated routes — passed
  • Direct helper smoke test — passed
  • bundle exec rspec / full rake — not run: clean dependency installation requires native extension compilation, but the sandbox denied reading /usr/include/stdc-predef.h.
  • npm run generate generated the expected route changes; its post-generate Ruby formatter could not run for the same missing bundle. Unrelated generated resource formatting changes were reverted.

Merge Danger

Door: two-way

Blast Radius: request validation

All generated at-least-one guards now delegate to one equivalent helper. Disabling that helper makes the direct validation and paginator specs stop rejecting invalid requests.

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