Repository navigation
Update generated code for private-preview - #2004
Open
stripe-openapi[bot] wants to merge 5 commits into
Open
stripe-openapi[bot] wants to merge 5 commits into
stripe-openapi[bot] wants to merge 5 commits into
Conversation
…13e3441 (#1998) Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
* fix(encode): encode bool and datetime list elements like scalars _api_encode converts top-level and nested-dict bool and datetime values (bool -> "true"/"false", datetime -> unix timestamp) but yielded them raw when they appeared as direct elements of a list. A list param therefore serialized booleans as "True"/"False" and datetimes as their str() repr instead of the forms the API expects. Handle bool and datetime in the list branch the same way as at the top level. Adds regression tests. * Add changefile for list bool/datetime encoding fix --------- Co-authored-by: jar-stripe <[email protected]>
* Reject "." and ".." path segments before sending requests HTTP clients such as httpx, requests and aiohttp remove "." and ".." segments from a URL before sending it. Since quote_plus leaves dots alone, an ID of "." or ".." changed which endpoint a method called. validate_path now rejects these segments, including percent-encoded forms, with an InvalidRequestError. Co-Authored-By: Claude Opus 5.5 <[email protected]> Committed-By-Agent: claude * Omit the query string from the dot-segment error message Paths can carry query parameters such as a client_secret, which then ended up in the exception message and any logs that record it. The message now shows only the path. Co-Authored-By: Claude Opus 5.5 <[email protected]> Committed-By-Agent: claude * Correct the comment on why validate_path raises InvalidRequestError The API only rejects these paths when the dot segment is last (it becomes a trailing slash). A ".." parent ID collapses into a valid path with the default sync client, so the API does not reject it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Committed-By-Agent: claude * Raise ValueError for dot-segment paths, like the other path checks validate_path already raises ValueError for paths it won't send. Nothing reaches the API when this check fails, so an InvalidRequestError (which normally describes an API response) was misleading. Co-Authored-By: Claude Opus 5.5 <[email protected]> Committed-By-Agent: claude * Treat an encoded slash as a separator when checking for dot segments An ID like "x/../../customers/cus_B" is sent as one segment, x%2F..%2F..%2Fcustomers%2Fcus_B, which passed the check. A proxy that decodes the path before normalizing it (nginx's proxy_pass, for example) would still turn it into a request for a different object. Splitting on "%2F" as well as "/" rejects it, while IDs that merely contain a slash keep working. Co-Authored-By: Claude Opus 5.5 <[email protected]> Committed-By-Agent: claude --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
stripe-openapi
Bot
requested review from
zacchua-stripe
and removed request for
a team
November 24, 2026 20:23
…e3b03946089cbfdd4d61a12212
stripe-openapi
Bot
force-pushed
the
latest-codegen-private-preview
branch
from
November 24, 2026 20:23
80995a8 to
09e32f5
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Codegen for openapi v2602 and v2 openapi b608cd5088d47fe3b03946089cbfdd4d61a12212.
Changelog