Skip to content

Make v2 search limit hoisting explicit - #2324

Merged
jar-stripe merged 4 commits into
masterfrom
jar/v2-search-limit-metadata
Nov 2, 2026
Merged

jar-stripe merged 4 commits into
masterfrom
jar/v2-search-limit-metadata

Conversation

@jar-stripe

@jar-stripe jar-stripe commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Why?

ApiService#request has special handling for v2 search methods. This handling is invoked when a POST method has a path that starts with /v2 and ends with search, but that is also a valid pattern for v2 custom operations. Our code generator needs to be able to generate code that adequately distinguishes between the two types of methods.

What?

  • Remove automatic path-based splitting from the unchanged five-argument ApiRequest constructor; no boolean overload or per-request flag.
  • Add protected ApiService.requestV2Search(ApiRequest, Type), copying and preparing URL/body before exactly one ordinary request delegation.
  • Strip any incoming query string in the v2 search helper, then append limit from params if present and remove it from the copied body. Pagination uses ordinary requests, preserving server-authored page URLs.
  • Cover normalization with and without limit/null params, unchanged caller params and metadata, single dispatch, and multi-page body replay.

Validation: just test and just format-check pass, including StripeSearchResultTest.

See Also

Configuration

  • skip-changefile: This PR is not a user-facing change, so there's no changefile.

Committed-By-Agent: goose
Orbit-Session-Id: bf0045b8-bfc9-4e18-ae11-5f042ce9add7
Committed-By-Agent: goose
Orbit-Session-Id: bf0045b8-bfc9-4e18-ae11-5f042ce9add7
@jar-stripe
jar-stripe marked this pull request as ready for review November 2, 2026 16:50
@jar-stripe
jar-stripe requested a review from a team as a code owner November 2, 2026 16:50
@jar-stripe
jar-stripe requested review from a team, mark-kogan-stripe and mnorth-stripe and removed request for a team and mnorth-stripe November 2, 2026 16:50

@mark-kogan-stripe mark-kogan-stripe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG!

Committed-By-Agent: goose
Orbit-Session-Id: bf0045b8-bfc9-4e18-ae11-5f042ce9add7
@jar-stripe
jar-stripe merged commit 1a79e37 into master Nov 2, 2026
20 checks passed
@jar-stripe
jar-stripe deleted the jar/v2-search-limit-metadata branch November 2, 2026 18:23
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.

2 participants