Skip to content

Update generated code for private-preview - #2004

Open
stripe-openapi[bot] wants to merge 5 commits into
private-previewfrom
latest-codegen-private-preview
Open

stripe-openapi[bot] wants to merge 5 commits into
private-previewfrom
latest-codegen-private-preview

Conversation

@stripe-openapi

@stripe-openapi stripe-openapi Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Codegen for openapi v2602 and v2 openapi 4fc7e02b5b6846eeaaff9b189e907f0f97aa3215.

Changelog

  • Release specs are identical.

stripe-openapi Bot and others added 4 commits November 18, 2026 19:26
…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 <jar@stripe.com>
* 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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
Committed-By-Agent: claude

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@stripe-openapi
stripe-openapi Bot requested a review from a team as a code owner November 24, 2026 20:23
@stripe-openapi
stripe-openapi Bot requested review from zacchua-stripe and removed request for a team November 24, 2026 20:23
@stripe-openapi
stripe-openapi Bot force-pushed the latest-codegen-private-preview branch from 80995a8 to 09e32f5 Compare November 24, 2026 20:23
@stripe-openapi
stripe-openapi Bot removed the request for review from zacchua-stripe November 24, 2026 20:23
@stripe-openapi
stripe-openapi Bot enabled auto-merge November 24, 2026 20:23
@stripe-openapi
stripe-openapi Bot force-pushed the latest-codegen-private-preview branch from 09e32f5 to 346b4fc Compare November 24, 2026 23:09
@stripe-openapi
stripe-openapi Bot force-pushed the latest-codegen-private-preview branch from 346b4fc to 630b2b6 Compare November 24, 2026 23:09

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.

3 participants