Skip to content

docs(openapi): correct exchangeRate example to match documented basis (PROD-54)#630

Closed
ls-bolt[bot] wants to merge 1 commit into
mainfrom
06-29-PROD-54-fix-exchange-rate-example-basis
Closed

docs(openapi): correct exchangeRate example to match documented basis (PROD-54)#630
ls-bolt[bot] wants to merge 1 commit into
mainfrom
06-29-PROD-54-fix-exchange-rate-example-basis

Conversation

@ls-bolt

@ls-bolt ls-bolt Bot commented Jun 29, 2026

Copy link
Copy Markdown

This PR has been claimed. The active PR is now #631.

Summary

The exchangeRate field on the /exchange-rates ExchangeRate schema is documented as "Number of sending currency units per receiving currency unit", but the examples were showing the inverse (destination-per-source) direction — contradicting both the field description and the live API:

  • ExchangeRate.yaml schema example: USD→INR 82.50
  • allRatesFromUSD response example: USD→INR 82.50, USD→EUR 0.925

The live API returns ~0.01 for USD→INR, confirming the field is sending-units-per-receiving-unit. This is a docs-only example fix — the API itself is correct (confirmed by the ticket owner on PROD-54).

Changes

Corrected the examples to the documented basis, keeping each response example internally consistent with its sendingAmount/receivingAmount:

Corridor Before After Basis check
USD→INR exchangeRate 82.50 0.012121 1/82.50; $100 → ₹8,250 (receivingAmount 825000) ✓
USD→EUR exchangeRate 0.925 1.081081 1/0.925; $100 → €92.50
USD→EUR receivingAmount 18500 9250 €92.50 at the corrected rate ✓

Files:

  • openapi/components/schemas/exchange_rates/ExchangeRate.yaml
  • openapi/paths/exchange-rates/exchange_rates.yaml
  • openapi.yaml + mintlify/openapi.yaml (regenerated via make build)

Scope note

PROD-54 was split out of PROD-50 (the broader exchange-rate basis cleanup). The many exchangeRate examples in the narrative Mintlify docs (0.92, 17.25, etc.) share the same directional inconsistency but are tracked under PROD-50 and intentionally out of scope here. The Quote.yaml exchangeRate field shares the same description but has no example, so nothing to fix there.

Test plan

  • make build — rebundles cleanly
  • make lint-openapi — 0 errors (pre-existing warnings/infos on unrelated schemas only)
  • Verified each corrected example is internally consistent with its sendingAmount/receivingAmount

Fixes PROD-54

Slack thread: https://lightsparkgroup.slack.com/archives/D0AHP8H9E13/p1782750571018079


🤖 volatile-relay(#1) | Feedback

… (PROD-54)

The exchangeRate field on the /exchange-rates ExchangeRate schema is documented
as 'Number of sending currency units per receiving currency unit', but the
examples showed destination-per-source values (USD->INR 82.50, USD->EUR 0.925),
the inverse of both the field description and the live API.

Correct the examples to the documented basis (sending units per receiving unit)
and keep each response example internally consistent with its sendingAmount and
receivingAmount: USD->INR 0.012121 (= 1/82.50, $100 -> 8250 INR), USD->EUR
1.081081 (= 1/0.925, $100 -> 92.50 EUR, receivingAmount 18500 -> 9250).
@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
grid-flow-builder Ignored Ignored Preview Jun 29, 2026 4:36pm
grid-wallet-demo Ignored Ignored Preview Jun 29, 2026 4:36pm

Request Review

@ls-bolt ls-bolt Bot added the bolt label Jun 29, 2026

akanter commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds for grid

This PR will update the grid SDKs with the following commit messages.

cli
⏳ (generating...)```
docs(openapi): correct exchangeRate example to match documented basis (PROD-54)

**csharp**
⏳ (generating...)```
docs(openapi): correct exchangeRate example to match documented basis (PROD-54)

go

chore(internal): regenerate SDK with no functional changes

kotlin
⏳ (generating...)```
docs(openapi): correct exchangeRate example to match documented basis (PROD-54)

**openapi**
⏳ (generating...)```
docs(openapi): correct exchangeRate example to match documented basis (PROD-54)

php
⏳ (generating...)```
docs(openapi): correct exchangeRate example to match documented basis (PROD-54)

**python**
⏳ (generating...)```
docs(openapi): correct exchangeRate example to match documented basis (PROD-54)

ruby
⏳ (generating...)```
docs(openapi): correct exchangeRate example to match documented basis (PROD-54)

**typescript**
⏳ (generating...)```
docs(openapi): correct exchangeRate example to match documented basis (PROD-54)

Edit this comment to update them. They will appear in their respective SDK's changelogs.

grid-typescript studio
grid-openapi studio
grid-ruby studio
grid-go studio · code · diff

generate ✅build ⏳lint ⏳test ⏳

go get github.com/stainless-sdks/grid-go@1c5c368c027d9a710515f53dc5f4a1960112d282
grid-kotlin studio
grid-python studio
grid-csharp studio
grid-php studio
grid-cli studio

⏳ These are partial results; builds are still running.


This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-06-29 16:37:09 UTC

AaryamanBhute added a commit that referenced this pull request Jun 29, 2026
… (PROD-54) (#631)

## Summary

The `exchangeRate` field on the `/exchange-rates` `ExchangeRate` schema is documented as **"Number of sending currency units per receiving currency unit"**, but the examples were showing the inverse (destination-per-source) direction — contradicting both the field description and the live API:

- `ExchangeRate.yaml` schema example: USD→INR `82.50`
- `allRatesFromUSD` response example: USD→INR `82.50`, USD→EUR `0.925`

The live API returns `~0.01` for USD→INR, confirming the field is sending-units-per-receiving-unit. This is a docs-only example fix — the API itself is correct (confirmed by the ticket owner on PROD-54).

## Changes

Corrected the examples to the documented basis, keeping each response example internally consistent with its `sendingAmount`/`receivingAmount`:

| Corridor | Before | After | Basis check |
|----------|--------|-------|-------------|
| USD→INR `exchangeRate` | `82.50` | `0.012121` | `1/82.50`; $100 → ₹8,250 (receivingAmount 825000) ✓ |
| USD→EUR `exchangeRate` | `0.925` | `1.081081` | `1/0.925`; $100 → €92.50 |
| USD→EUR `receivingAmount` | `18500` | `9250` | €92.50 at the corrected rate ✓ |

Files:
- `openapi/components/schemas/exchange_rates/ExchangeRate.yaml`
- `openapi/paths/exchange-rates/exchange_rates.yaml`
- `openapi.yaml` + `mintlify/openapi.yaml` (regenerated via `make build`)

## Scope note

PROD-54 was split out of PROD-50 (the broader exchange-rate basis cleanup). The many `exchangeRate` examples in the narrative Mintlify docs (`0.92`, `17.25`, etc.) share the same directional inconsistency but are tracked under PROD-50 and intentionally **out of scope** here. The `Quote.yaml` `exchangeRate` field shares the same description but has no example, so nothing to fix there.

## Test plan
- `make build` — rebundles cleanly
- `make lint-openapi` — 0 errors (pre-existing warnings/infos on unrelated schemas only)
- Verified each corrected example is internally consistent with its `sendingAmount`/`receivingAmount`

Fixes PROD-54

Slack thread: https://lightsparkgroup.slack.com/archives/D0AHP8H9E13/p1782750571018079

---
🤖 [volatile-relay](https://zeus.dev.dev.sparkinfra.net/#/arc?id=volatile-relay)[(#1)](https://zeus.dev.dev.sparkinfra.net/#/instance?id=volatile-relay) | [Feedback](https://zeus.dev.dev.sparkinfra.net/feedback)

Original PR: #630
@AaryamanBhute AaryamanBhute deleted the 06-29-PROD-54-fix-exchange-rate-example-basis branch June 29, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants