Skip to content

Update generated code for beta - #2003

Open
stripe-openapi[bot] wants to merge 6 commits into
betafrom
latest-codegen-beta
Open

stripe-openapi[bot] wants to merge 6 commits into
betafrom
latest-codegen-beta

Conversation

@stripe-openapi

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

Copy link
Copy Markdown
Contributor

Codegen for openapi v2602 and v2 openapi 11a5de5a2b74f8ec75d8f9419c1af77869b2f21e.

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:21
@stripe-openapi
stripe-openapi Bot requested review from jar-stripe and removed request for a team November 24, 2026 20:21
@stripe-openapi
stripe-openapi Bot force-pushed the latest-codegen-beta branch from 1f35b2b to a867e6c Compare November 24, 2026 20:21
@stripe-openapi
stripe-openapi Bot removed the request for review from jar-stripe November 24, 2026 20:22
@stripe-openapi
stripe-openapi Bot enabled auto-merge November 24, 2026 20:22
@stripe-openapi
stripe-openapi Bot force-pushed the latest-codegen-beta branch 2 times, most recently from 28f8389 to c6610b7 Compare November 24, 2026 23:13
* Encode decimal_string values in fixed-point notation

_encode_decimal used str(), which switches to exponent notation for
small and large values: str(0.00001) is "1e-05", str(1e16) is "1e+16",
and str(Decimal("0.0000001")) is "1E-7". The V2 API rejects decimal
strings in exponent notation.

Format finite Decimals with format(dec, "f"), and convert finite floats
through Decimal(repr(value)) first so they keep their shortest
round-trip digits. Values that str() already wrote in fixed-point,
non-finite values, and ints are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Committed-By-Agent: claude

* Shorten the decimal_string changefile to a title

Match the title-only style of other patch changefiles and link the Jira
ticket.

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 force-pushed the latest-codegen-beta branch 3 times, most recently from 251e848 to 901b303 Compare November 26, 2026 16:13
@stripe-openapi
stripe-openapi Bot force-pushed the latest-codegen-beta branch from 901b303 to 643c054 Compare November 26, 2026 16:13

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