Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
b639ed1
feat: codegen modernization for Stripe API 2026-01-28.clover
Feb 21, 2026
e8bbbfa
fix: deterministic basePath selection, basePath-preferring dedup, and…
Feb 21, 2026
ef8ff31
feat: add generated Stripe API types, routes, and params
Feb 21, 2026
be05b15
fix: Linux compatibility for NIO/Foundation API differences
Feb 21, 2026
08b5cb2
refactor: modernize codegen APIs per Vapor community standards
Feb 21, 2026
77af12e
fix: only skip dot-named schemas that collide with underscore variants
Feb 21, 2026
335d62b
feat: auto-generate StripeEventType enum and StripeEvent from spec
Feb 26, 2026
0fc0caf
Fix verify() decode: remove conflicting .convertFromSnakeCase
Mar 2, 2026
e149e37
Revert "Fix verify() decode: remove conflicting .convertFromSnakeCase"
Mar 2, 2026
4c4a00b
Fix codegen: remove conflicting .convertFromSnakeCase from verify()
Mar 2, 2026
a3905f1
Fix codegen: remove .convertFromSnakeCase from all decode paths
Mar 2, 2026
17dcf45
fix: decode deleted objects and free-form JSON; add Stripe fixture tests
grahamburgsma Nov 9, 2026
a0d3836
Merge main into feature/autogen
grahamburgsma Nov 9, 2026
5a7cbbb
feat: update to Stripe API 2026-10-28.endive
grahamburgsma Nov 14, 2026
687af72
fix: form-encode params via Codable; fix multipart auth header
grahamburgsma Nov 16, 2026
c07ee26
feat: typed query params for list/search routes; spec-driven return t…
grahamburgsma Nov 16, 2026
722bfba
feat: name routes from the spec's x-stripeOperations
grahamburgsma Nov 16, 2026
b2d49bb
fix(codegen): clear generated output when the path has a space
grahamburgsma Nov 16, 2026
befe65a
feat: group routes by their x-stripeOperations owner, like Stripe's SDKs
grahamburgsma Nov 16, 2026
d9a086f
test: spec coverage check in the generator, plus a coverage test
grahamburgsma Nov 16, 2026
79806b0
feat: type anyOf params as unions and maps by their values
grahamburgsma Nov 16, 2026
6b7e08f
feat: resolve the remaining coverage exceptions
grahamburgsma Nov 16, 2026
d540da5
refactor(codegen): remove dead code, dedupe helpers, fix stale comments
grahamburgsma Nov 17, 2026
6f826ba
fix(codegen): only wrap ID-or-object fields in @Expandable
grahamburgsma Nov 17, 2026
71ec9ae
fix(codegen): expand fields that can be deleted objects to ObjectOrDe…
grahamburgsma Nov 17, 2026
f74e611
fix: generate the Stripe-Version header value from the spec
grahamburgsma Nov 17, 2026
78d5ce2
feat(codegen): type Unix timestamps as Date
grahamburgsma Nov 17, 2026
2f9ae79
fix: remove debug prints from StripeAPIHandler
grahamburgsma Nov 17, 2026
032cc85
fix: harden webhook signature verification
grahamburgsma Nov 17, 2026
698ced9
refactor: move static webhook code out of the generator; add JSONValue
grahamburgsma Nov 17, 2026
bc5d4a7
refactor(codegen): generate param enums where their fields are typed
grahamburgsma Nov 17, 2026
21680a6
refactor: one-line generated routes over a single request core
grahamburgsma Nov 17, 2026
a5f32e5
fix: percent-encode path parameters via a StripePath type
grahamburgsma Nov 17, 2026
c0bf0f9
feat(codegen)!: stable namespaced type names; group the client by nam…
grahamburgsma Nov 17, 2026
c0064b5
fix(codegen): polymorphic lists keep their items in data; untyped as …
grahamburgsma Nov 17, 2026
6b4e9ab
fix(codegen): suffix event payload types with Event; fail on type nam…
grahamburgsma Nov 17, 2026
2d81044
feat(codegen)!: labeled route methods with defaults and per-request o…
grahamburgsma Nov 17, 2026
0f00159
feat!: remove idempotent(_:) and the client-wide idempotency key
grahamburgsma Nov 17, 2026
1632e30
feat(codegen)!: extensible string enums; unknown values no longer fai…
grahamburgsma Nov 17, 2026
b5f957d
feat: retry failed requests with backoff, like Stripe's SDKs
grahamburgsma Nov 17, 2026
36ed28f
feat(codegen): clear(_:) for params fields Stripe lets you unset
grahamburgsma Nov 17, 2026
4636437
refactor(codegen)!: one generic StripeList instead of a list struct p…
grahamburgsma Nov 17, 2026
2c57f7f
refactor(codegen)!: share identical nested params across a resource's…
grahamburgsma Nov 17, 2026
a28d25d
refactor(codegen): emit Swift through an indenting CodeWriter
grahamburgsma Nov 17, 2026
6c5afae
refactor(codegen): decide shared params names before generating
grahamburgsma Nov 17, 2026
135c8a7
docs: rewrite the README for the generated SDK
grahamburgsma Nov 17, 2026
4375986
test: keep fixtures3.json at the repo root, next to spec3.sdk.json
grahamburgsma Nov 18, 2026
7f57b2b
chore: final cleanup of comments, dead code and tests
grahamburgsma Nov 18, 2026
71d4974
refactor: import FoundationEssentials where available, and only where…
grahamburgsma Nov 18, 2026
22e6143
refactor: enable ExistentialAny and spell existentials as `any P`
grahamburgsma Nov 18, 2026
9f0133c
fix: build on Linux by percent-encoding without Foundation
grahamburgsma Nov 18, 2026
f152bde
refactor: make params encode-only
grahamburgsma Nov 18, 2026
1456479
refactor: split StripeKit into modules and generate models with let p…
grahamburgsma Nov 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
/*.xcodeproj
Package.pins
Package.resolved
/.swiftpm
/.swiftpm
spec3.json
141 changes: 0 additions & 141 deletions CHANGELOG.md

This file was deleted.

59 changes: 52 additions & 7 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
// swift-tools-version:5.7
// swift-tools-version:6.0
import PackageDescription

/// Settings for every target
let swiftSettings: [SwiftSetting] = [
// Existential types are spelled `any P`, so they can't be mistaken for generics
.enableUpcomingFeature("ExistentialAny"),
]

/// Settings for the library targets
let librarySettings = swiftSettings + [
// Each file must import the modules whose members it uses, so the imports stay accurate
.enableUpcomingFeature("MemberImportVisibility"),
]

let package = Package(
name: "stripe-kit",
platforms: [
.macOS(.v12),
.macOS(.v14),
.iOS(.v15),
.tvOS(.v15),
.watchOS(.v8)
Expand All @@ -16,15 +28,48 @@ let package = Package(
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.33.1"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.97.1"),
.package(url: "https://github.com/apple/swift-crypto.git", "3.0.0" ..< "6.0.0"),
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.4.0"),
],
targets: [
// StripeKit is split so no module is too big to optimize in one compiler process (see
// `GeneratedModule` in the codegen). Users import StripeKit, which re-exports the rest.
.target(name: "StripeKit", dependencies: [
.target(name: "StripeKitCore"),
.target(name: "StripeKitModels"),
.target(name: "StripeKitParams"),
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.product(name: "NIO", package: "swift-nio"),
.product(name: "NIOHTTP1", package: "swift-nio"),
], swiftSettings: librarySettings),
// Generated resources, their inline types, and events, with errors and webhooks
.target(name: "StripeKitModels", dependencies: [
.target(name: "StripeKitCore"),
.product(name: "Crypto", package: "swift-crypto"),
.product(name: "NIOFoundationCompat", package: "swift-nio")
]),
.testTarget(name: "StripeKitTests", dependencies: [
.target(name: "StripeKit")
])
], swiftSettings: librarySettings),
// Generated request params
.target(name: "StripeKitParams", dependencies: [
.target(name: "StripeKitCore"),
], swiftSettings: librarySettings),
// Hand-written building blocks the generated code uses
.target(name: "StripeKitCore", swiftSettings: librarySettings),
.executableTarget(
name: "stripe-kit-codegen",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
],
path: "Sources/Codegen",
swiftSettings: swiftSettings
),
.testTarget(
name: "StripeKitTests",
dependencies: [
.target(name: "StripeKit"),
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOPosix", package: "swift-nio"),
.product(name: "NIOHTTP1", package: "swift-nio"),
],
swiftSettings: swiftSettings
)
]
)
Loading
Loading