Repository navigation
Conversation
Since #525 set edition 2026-05-06, the V2 normalizer has merged allOf entries that the old normalizer dropped. Transforms written for the old normalizer strip each variant's base $ref, which leaves an empty allOf entry. V2 then can't tell the variants apart and collapses these unions in every generated SDK: - ExternalAccountInfoOneOf: 5 of 49 account variants - PaymentInstructions.AccountOrWalletInfo: 3 of 18 variants - QuoteSourceOneOf, QuoteDestinationOneOf, TransactionSourceOneOf: none Remove the six base-$ref strips and the sourceType and destinationType strips. Keep the accountType strip, and also drop accountType from the base schemas' required lists, so each account variant reuses its shared *AccountInfo enum and the generated converters compile. Also drop three model refs to card summary schemas that #947 removed, and configure the Kotlin target for stlc: a staging repo and a release-please block so Maven publishing runs on each GitHub release. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
|
This PR does not match any of the 3 configured review trigger rules. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Oct 6, 2026
ExchangeRate.destinationPaymentRail and AccountDestination.paymentRail wrapped their PaymentRail $ref in an allOf to attach a description. The V2 normalizer turns that wrapper into an untyped field, so the Kotlin SDK returned these as JsonValue instead of the PaymentRail enum. Put the description next to the $ref instead, as 33 other fields already do. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Contributor
|
The transform that strips the AuthCredentialVerifyRequest $ref from each verify variant left PasskeyCredentialVerifyRequest with no fields under the V2 normalizer, so Kotlin SDK 1.9.0 and later can't build a passkey verify request. Replace it with a strip of the base schemas' required lists, the same fix as the account schemas. The create and verify unions then dispatch on type, so SMS_OTP and EMAIL_OTP requests deserialize as the right variant. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Restoring the quote and transaction unions left each variant inheriting the wide sourceType or destinationType enum from its base schema, so the Kotlin SDK required callers to set the variant's own type, for example sourceType(ACCOUNT) on QuoteSourceOneOf.Account. Strip those enums and their required entries from the base schemas, as for accountType. The builders then default the type per variant, as they did in 1.7.1. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Stop registering QuoteRequest as a quotes model. The registration made QuoteCreateParams take a single quoteRequest(QuoteRequest) argument; without it the builder has flat setters (source, destination, lockedCurrencyAmount) and nested LockedCurrencySide and PurposeOfPayment enums, as in 1.7.1. Stop registering Refund as a sandbox card simulate model. The registration moved IncomingTransaction.refund() and OutgoingTransaction.refund() onto sandbox.cards.simulate.Refund; without it each transaction keeps its own Refund type, as in 1.7.1. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch was successfully 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.

What this does
The SDK generators return a union type wherever the spec uses
oneOf, with one typed variant per schema. Since #525 setedition: 2026-05-06, five of those unions have generated without most of their variants. That release turned on the V2 normalizer, and V2 handlesallOfdifferently from the old normalizer.Our config strips each variant's base
$ref(BaseQuoteSource,BaseExternalAccountInfo, and others), which leaves an empty entry in the variant'sallOf. The old normalizer tolerated that. V2 can't tell the variants apart and collapses the union.ExternalAccountInfoOneOfPaymentInstructions.AccountOrWalletInfoQuoteSourceOneOfQuoteDestinationOneOfTransactionSourceOneOfAuthCredentialVerifyRequestOneOfIn the Kotlin SDK 1.10.0,
externalAccount.accountInfo()can't return an MXN, USD, or EUR account as a typed value, andQuoteSourceOneOfhas noAccountvariant. The TypeScript generator typesQuoteSourceOneOfasunknown.Changes
Remove the six transforms that strip a base
$reffrom account, quote, and transaction variants.Keep the transform that strips
accountTypefromBaseExternalAccountInfoandBasePaymentAccountInfo, and also drop theirrequiredlists. Without this, V2 gives each account variant its ownAccountTypeenum, and the generatedto*AccountInfo()converters don't compile.Remove three model refs to card summary schemas that Remove unimplemented CardTransaction summary fields #947 deleted. Every build reported them as missing references.
Add
staging_repoand apublish.releaseblock to the Kotlin target for stlc. The release block makespublish-sonatype.ymlrun on each GitHub release.Move the descriptions on
ExchangeRate.destinationPaymentRailandAccountDestination.paymentRailnext to their$refinstead of wrapping the$refin anallOf. V2 turns that wrapper into an untyped field, so the Kotlin SDK returned these asJsonValueinstead of thePaymentRailenum. 33 other fields already use the$refplusdescriptionform.Also strip
sourceTypeanddestinationType, and theirrequiredentries, from the four source and destination base schemas, as foraccountType. The SDK builders then default the type for each variant, as they did in Kotlin SDK 1.7.1, instead of requiring callers to setsourceType(ACCOUNT).Stop registering
QuoteRequestas aquotesmodel. The registration, added in chore(stainless): bump edition, sync resources, fix webhook discrimination #525, madeQuoteCreateParamstake onequoteRequest(QuoteRequest)argument. Without it, the builder has the flatsource,destination, andlockedCurrencyAmountsetters that Kotlin SDK 1.7.1 had.Stop registering
Refundas a sandbox card simulate model. The registration movedIncomingTransaction.refund()andOutgoingTransaction.refund()ontosandbox.cards.simulate.Refund. Without it, each transaction type keeps its ownRefundclass, as in 1.7.1.Replace the transform that strips the
AuthCredentialVerifyRequest$reffrom each verify variant with a strip of the auth base schemas'requiredlists, the same fix as the account schemas. Under V2 the old transform leftPasskeyCredentialVerifyRequestwith no fields, so Kotlin SDK 1.9.0 and later can't build a passkey verify request. The create and verify unions now dispatch ontype, soSMS_OTPandEMAIL_OTPrequests deserialize as the right variant.Tests
./gradlew testpasses: 1,846 tests, 0 failures, 114 skipped../gradlew lintpasses.QuoteRequestandRefundchange it needs edits on 26 lines; after the change, 21. The remaining edits are the V2 normalizer's union variant names (ofAccountQuoteSourceis nowofAccount) andOutgoingTransaction.status(), which returnsOutgoingTransaction.Statusinstead ofOutgoingTransactionStatus. Settingx-stainless-variantNameon the variants did not change the names under V2.tsc --noEmiton the TypeScript SDK reports the same three errors before and after: one TS2307 and two TS2353 in tests. None is the TS2312 the removed transforms were written to avoid.samples/kotlinto the regenerated SDK. All 8 of its end-to-end tests pass against the dev sandbox. A program written against Kotlin SDK 1.10.0 that doesn't create quotes or build auth unions by hand compiles unchanged. The SDK PR lists what does change.The regenerated Kotlin SDK is lightsparkdev/grid-kotlin-sdk#28.
🤖 Generated with Claude Code