Skip to content

Make v2 search limit hoisting explicit - #1960

Draft
jar-stripe wants to merge 2 commits into
masterfrom
jar/v2-search-limit-metadata
Draft

jar-stripe wants to merge 2 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?

Fix an existing master defect: ordinary POST requests ending in /search currently hoist limit even for custom methods. #4233 exposes this through added coverage, but is neither the cause nor the base of this fix.

What?

  • Add _request_v2_search and _request_v2_search_async, each splitting URL/body before one ordinary-request delegation.
  • Delete suffix-based hoisting from _request and _request_async.
  • Preserve options, base address, usage, parameter encodings, and single coercion. Copy caller params and preserve any existing-query URL byte-for-byte.
  • Cover paired sync/async dispatch, absent limits/null params, ordinary custom requests, encoding, immutability, and pagination.
  • Add a patch changefile documenting migration for handwritten low-level search services.

Validation: just test (4,371 passed, 7 skipped); just lint; just format-check; just typecheck; just typecheck-examples pass. Focused search suite: 17 passed. GA regeneration produces no generated changes.

Additional acceptance in disposable worktrees only: #4233 head 5508bd65545fe39e9ebd99eba249f642f1434e1a, Python private-preview baseline 481b84d7. just run-with-capture /tmp/search-gen-python.txt gen python --private-preview --repo=<temporary Python worktree>, then just test tests/test_generated_examples.py -n 0 (3,559 passed) and -k test_v2_data_operation_search_post_all_service pass. No preview generated files are included here.

See Also

https://github.com/stripe/sdk-codegen/pull/4331

https://github.com/stripe/sdk-codegen/pull/4233 (additional coverage only; unchanged)

Reviewed #1939: preserve sync/async POST pagination with the original body and request options. Existing request signatures remain usable; handwritten low-level search services must opt into the dedicated helper. Runtime helpers must ship before codegen-generated calls are released.

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

This branch has not been deployed

No deployments
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