Remove external account details quote destination#308
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✱ Stainless preview buildsThis PR will update the kotlin openapi python typescript
|
Greptile SummaryThis PR removes the Key changes:
One issue found: Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/quotes/QuoteDestinationOneOf.yaml | Removes ExternalAccountDetailsDestination from the oneOf list and discriminator mapping, leaving only ACCOUNT and UMA_ADDRESS as valid destination types. |
| openapi/paths/quotes/quotes.yaml | Updates realTimeFundingToSparkWallet example from EXTERNAL_ACCOUNT_DETAILS inline to ACCOUNT with a pre-registered ExternalAccount ID. |
| .stainless/stainless.yml | Not updated in this PR — still contains two active remove transform targets referencing the now-deleted ExternalAccountDetailsDestination and ExternalAccountDetailsTransactionDestination schemas, which could break Stainless SDK generation. |
| mintlify/ramps/quickstart.mdx | Adds a new "Step 2: Create an External Account" with full request/response example before the quote creation step; all step numbers correctly incremented. |
| mintlify/rewards/quickstart.mdx | Adds Step 4 to register the destination Spark wallet as an external account (with customerId now correctly included); quote step updated to use AccountDestination by ID. |
| mintlify/payouts-and-b2b/platform-tools/sandbox-testing.mdx | Updated sandbox quote testing to use two-step flow; the new AccountDestination example incorrectly retains "currency": "EUR" which is not a defined field in the schema. |
Sequence Diagram
sequenceDiagram
participant Dev as Developer
participant API as Grid API
Note over Dev,API: Old flow (EXTERNAL_ACCOUNT_DETAILS — removed)
Dev->>API: POST /quotes { destination: { destinationType: EXTERNAL_ACCOUNT_DETAILS, externalAccountDetails: {...} } }
API-->>Dev: Quote created (external account auto-created internally)
Note over Dev,API: New flow (two-step, ACCOUNT reference)
Dev->>API: POST /customers/external-accounts { customerId, currency, accountInfo }
API-->>Dev: { id: "ExternalAccount:...", status: "ACTIVE", ... }
Dev->>API: POST /quotes { destination: { destinationType: ACCOUNT, accountId: "ExternalAccount:..." } }
API-->>Dev: Quote created (references pre-registered external account)
Comments Outside Diff (1)
-
.stainless/stainless.yml, line 621-648 (link)Stale references to deleted schemas
ExternalAccountDetailsDestinationandExternalAccountDetailsTransactionDestinationhave been removed from the OpenAPI spec in this PR, butstainless.ymlstill references both schemas in its transform pipeline (lines 624 and 648). When Stainless processes the spec, it will attempt to applyremovecommands to schema paths that no longer exist, which may cause SDK generation to fail.These two entries should be removed from their respective
targetlists:# ── Remove $ref to BaseDestination from destination variants ── - command: remove reason: >- Remove allOf $ref to BaseDestination from destination variants because the base schema becomes an empty object after stripping destinationType args: target: - "$.components.schemas.AccountDestination.allOf[0]" - "$.components.schemas.UmaAddressDestination.allOf[0]" # Remove the ExternalAccountDetailsDestination line # ── Remove $ref to BaseTransactionDestination from transaction destination variants ── - command: remove reason: >- Remove allOf $ref to BaseTransactionDestination from transaction destination variants because the base schema becomes an empty object after stripping destinationType args: target: - "$.components.schemas.AccountTransactionDestination.allOf[0]" - "$.components.schemas.UmaAddressTransactionDestination.allOf[0]" # Remove the ExternalAccountDetailsTransactionDestination line
Note: the commented-out reference at line 471 (
# "$.components.schemas.ExternalAccountDetailsDestination.allOf[1].properties") is already inactive but can also be removed for cleanliness.Prompt To Fix With AI
This is a comment left during a code review. Path: .stainless/stainless.yml Line: 621-648 Comment: **Stale references to deleted schemas** `ExternalAccountDetailsDestination` and `ExternalAccountDetailsTransactionDestination` have been removed from the OpenAPI spec in this PR, but `stainless.yml` still references both schemas in its transform pipeline (lines 624 and 648). When Stainless processes the spec, it will attempt to apply `remove` commands to schema paths that no longer exist, which may cause SDK generation to fail. These two entries should be removed from their respective `target` lists: ```yaml # ── Remove $ref to BaseDestination from destination variants ── - command: remove reason: >- Remove allOf $ref to BaseDestination from destination variants because the base schema becomes an empty object after stripping destinationType args: target: - "$.components.schemas.AccountDestination.allOf[0]" - "$.components.schemas.UmaAddressDestination.allOf[0]" # Remove the ExternalAccountDetailsDestination line # ── Remove $ref to BaseTransactionDestination from transaction destination variants ── - command: remove reason: >- Remove allOf $ref to BaseTransactionDestination from transaction destination variants because the base schema becomes an empty object after stripping destinationType args: target: - "$.components.schemas.AccountTransactionDestination.allOf[0]" - "$.components.schemas.UmaAddressTransactionDestination.allOf[0]" # Remove the ExternalAccountDetailsTransactionDestination line ``` Note: the commented-out reference at line 471 (`# "$.components.schemas.ExternalAccountDetailsDestination.allOf[1].properties"`) is already inactive but can also be removed for cleanliness. How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: .stainless/stainless.yml
Line: 621-648
Comment:
**Stale references to deleted schemas**
`ExternalAccountDetailsDestination` and `ExternalAccountDetailsTransactionDestination` have been removed from the OpenAPI spec in this PR, but `stainless.yml` still references both schemas in its transform pipeline (lines 624 and 648). When Stainless processes the spec, it will attempt to apply `remove` commands to schema paths that no longer exist, which may cause SDK generation to fail.
These two entries should be removed from their respective `target` lists:
```yaml
# ── Remove $ref to BaseDestination from destination variants ──
- command: remove
reason: >-
Remove allOf $ref to BaseDestination from destination variants
because the base schema becomes an empty object after stripping destinationType
args:
target:
- "$.components.schemas.AccountDestination.allOf[0]"
- "$.components.schemas.UmaAddressDestination.allOf[0]"
# Remove the ExternalAccountDetailsDestination line
# ── Remove $ref to BaseTransactionDestination from transaction destination variants ──
- command: remove
reason: >-
Remove allOf $ref to BaseTransactionDestination from transaction destination
variants because the base schema becomes an empty object after stripping destinationType
args:
target:
- "$.components.schemas.AccountTransactionDestination.allOf[0]"
- "$.components.schemas.UmaAddressTransactionDestination.allOf[0]"
# Remove the ExternalAccountDetailsTransactionDestination line
```
Note: the commented-out reference at line 471 (`# "$.components.schemas.ExternalAccountDetailsDestination.allOf[1].properties"`) is already inactive but can also be removed for cleanliness.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: mintlify/payouts-and-b2b/platform-tools/sandbox-testing.mdx
Line: 140-144
Comment:
**Stray `currency` field in `AccountDestination` example**
The `"currency": "EUR"` field appears to have been carried over from the old `externalAccountDetails` structure, where currency was a required field for the inline account creation payload. However, the `AccountDestination` schema (`openapi/components/schemas/quotes/AccountDestination.yaml`) does not define a `currency` property — the destination's currency is already captured on the external account itself at creation time.
All other `AccountDestination` examples in this PR (ramps quickstart, rewards quickstart, fiat-crypto-conversion, etc.) correctly omit `currency`. Consider removing it here for consistency and to avoid misleading developers:
```suggestion
"destination": {
"destinationType": "ACCOUNT",
"accountId": "ExternalAccount:..."
},
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (2): Last reviewed commit: "Remove external account details quote de..." | Re-trigger Greptile
| ```bash | ||
| curl -X POST "https://api.lightspark.com/grid/2025-10-13/customers/external-accounts" \ | ||
| -H "Authorization: Basic $GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "currency": "BTC", | ||
| "accountInfo": { | ||
| "accountType": "SPARK_WALLET", | ||
| "address": "spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu" | ||
| } | ||
| }' |
There was a problem hiding this comment.
Missing
customerId in external account creation
The customerId field is absent from the external account creation request here. Per the ExternalAccountCreateRequest schema, when customerId is omitted the account is created on behalf of the platform rather than the customer. This contradicts the section heading ("Register the customer's Spark wallet") and is inconsistent with every other external account creation example added in this PR — the rewards sandbox guide, the distributing-rewards developer guide, and the ramps quickstart all pass customerId.
Consider adding "customerId": "Customer:..." to the request body so that the external account is correctly associated with the customer, matching the intent of the rewards quickstart and keeping all examples consistent.
Prompt To Fix With AI
This is a comment left during a code review.
Path: mintlify/rewards/quickstart.mdx
Line: 183-193
Comment:
**Missing `customerId` in external account creation**
The `customerId` field is absent from the external account creation request here. Per the `ExternalAccountCreateRequest` schema, when `customerId` is omitted the account is created on behalf of the platform rather than the customer. This contradicts the section heading ("Register the customer's Spark wallet") and is inconsistent with every other external account creation example added in this PR — the rewards sandbox guide, the distributing-rewards developer guide, and the ramps quickstart all pass `customerId`.
Consider adding `"customerId": "Customer:..."` to the request body so that the external account is correctly associated with the customer, matching the intent of the rewards quickstart and keeping all examples consistent.
How can I resolve this? If you propose a fix, please make it concise.4e28c05 to
40844c0
Compare

No description provided.