feat(openapi): bundle latest spec (2026-03-25.dahlia) as filesystem fallback#207
Merged
kdhillon-stripe merged 1 commit intov2from Mar 30, 2026
Merged
Conversation
…allback Commits the latest Stripe OpenAPI SDK spec into the package so that when a user requests the matching API version (2026-03-25.dahlia), it is served directly from the bundled file with no network calls. For all other versions the existing cache → GitHub fetch flow is unchanged. To update the bundled spec in the future: curl -sL https://raw.githubusercontent.com/stripe/openapi/master/latest/openapi.spec3.sdk.json \ -o packages/openapi/bundled-spec.json # then bump BUNDLED_API_VERSION in specFetchHelper.ts to match info.version Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> Committed-By-Agent: claude
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.
Summary
openapi.spec3.sdk.json(version2026-03-25.dahlia) directly intopackages/openapi/asbundled-spec.jsonresolveOpenApiSpecserves from the local file — zero network callsbundled-spec.jsonintodist/so it's available at runtime'bundled'to thesourceunion type inResolvedOpenApiSpecWhy
The CDN (
b.stripecdn.com/api-artifacts/assets/openapi/...) only retains the last ~4 monthly releases (max_versions: 5in theapi-artifactsnamespace config). Older versions 403. The GitHub API is also rate-limited without a token. The bundled spec gives a zero-dependency fallback for the common case of using the latest version.Updating the bundled spec
When a new Stripe API version ships, run:
curl -sL https://raw.githubusercontent.com/stripe/openapi/master/latest/openapi.spec3.sdk.json \ -o packages/openapi/bundled-spec.json # bump BUNDLED_API_VERSION in packages/openapi/specFetchHelper.ts to match info.versionTest plan
pnpm buildpasses inpackages/openapi2026-03-25.dahliareturnssource: 'bundled'with no network calls🤖 Generated with Claude Code