You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(ruby): assert request body for parameter-group dispatchers
Tests previously stubbed the URL but never verified the wire body, so
the silent-drop bug fixed in b87038b — `update_organization_membership`
shipping a PUT with no body when only the `role` group managed it —
slipped past the suite. Two changes catch this class of regression:
- `buildCallArgsStub` now passes optional parameter groups too, not
just required ones. The old behavior left the dispatcher code path
unexercised whenever a group was optional, hiding the bug entirely.
- New `buildBodyMatcher` emits a webmock `.with(body: hash_including(...))`
matcher whenever an operation has any parameter group dispatched into
the body. The matcher includes required non-group body fields plus
the first variant's wire-name leaves, so any mismatch (missing body,
dropped variant leaf, wrong wire name) fails the test.
Verified by temporarily reverting b87038b: the regenerated
`test_update_organization_membership` errors with
`WebMock::NetConnectNotAllowedError` because the request body is empty
and doesn't match the stub. Restoring the fix makes it pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments