docs: sync CNY_ACCOUNT support with OpenAPI schema#555
Conversation
Add CNY_ACCOUNT to Grid Visualizer data files and update country support documentation to reflect China support added in #552. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR syncs the Grid Visualizer and country-support docs with the
Confidence Score: 3/5The docs and visualizer contradict the API schema on the payment rail for China, which will directly mislead integrators building CNY payout flows. The currencies.ts and country-support.mdx both advertise Bank Transfer for CNY payments, but CnyAccountInfo.yaml restricts paymentRails to MOBILE_MONEY. A developer reading the docs would expect to construct a bank-transfer flow, then hit an API validation error at runtime. The account-types.ts change is clean and matches the schema. currencies.ts and country-support.mdx — the rail label needs to align with the API schema before this goes live.
|
| Filename | Overview |
|---|---|
| components/grid-visualizer/src/data/account-types.ts | Adds CNY_ACCOUNT spec with phoneNumber and bankName fields, matching CnyAccountInfoBase.yaml exactly. |
| components/grid-visualizer/src/data/currencies.ts | Adds CNY currency entry but labels allRails as 'Bank Transfer', conflicting with the OpenAPI schema which restricts paymentRails to MOBILE_MONEY. |
| mintlify/snippets/country-support.mdx | Moves China from Coming Soon to supported, updates Asia-Pacific count to 10 (correct), but lists the payment rail as 'Bank Transfer' which contradicts the API schema (MOBILE_MONEY). |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[PR #555: Add CNY_ACCOUNT docs] --> B[account-types.ts
phoneNumber + bankName fields]
A --> C[currencies.ts
allRails: Bank Transfer ⚠️]
A --> D[country-support.mdx
China: Bank Transfer ⚠️]
B --> E[Matches CnyAccountInfoBase.yaml ✅]
C --> F[CnyAccountInfo.yaml
paymentRails: MOBILE_MONEY only ❌ mismatch]
D --> F
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
mintlify/snippets/country-support.mdx:27
**Payment rail label contradicts the OpenAPI schema**
The OpenAPI schema for `CnyAccountInfo` (`openapi/components/schemas/common/CnyAccountInfo.yaml`) restricts `paymentRails` to a single enum value: `MOBILE_MONEY`. The account fields (`phoneNumber` + `bankName`) also match a phone-based mobile-money flow (consistent with WeChat Pay / Alipay), not a conventional direct bank transfer. Listing China here as `Bank Transfer` will mislead developers who then find the API only accepts `MOBILE_MONEY` as the payment rail. The same mismatch exists in `currencies.ts` (`allRails: ['Bank Transfer']`).
### Issue 2 of 2
components/grid-visualizer/src/data/currencies.ts:274-276
The OpenAPI schema (`CnyAccountInfo.yaml`) restricts `paymentRails` to `MOBILE_MONEY` only, so labelling the rail as `Bank Transfer` here is inconsistent with the API contract. The label should reflect the actual underlying rail (mobile money via WeChat Pay / Alipay) to avoid confusing integrators.
```suggestion
instantRails: [],
allRails: ['Mobile Money'],
examplePerson: { fullName: 'Wei Zhang', nationality: 'CN' },
```
Reviews (1): Last reviewed commit: "docs: sync CNY_ACCOUNT support with Open..." | Re-trigger Greptile
| | 🇧🇷 Brazil | BR | `PIX` | | ||
| | 🇧🇬 Bulgaria | BG | `SEPA` `SEPA Instant` | | ||
| | 🇨🇲 Cameroon | CM | `Bank Transfer` | | ||
| | 🇨🇳 China | CN | `Bank Transfer` | |
There was a problem hiding this comment.
Payment rail label contradicts the OpenAPI schema
The OpenAPI schema for CnyAccountInfo (openapi/components/schemas/common/CnyAccountInfo.yaml) restricts paymentRails to a single enum value: MOBILE_MONEY. The account fields (phoneNumber + bankName) also match a phone-based mobile-money flow (consistent with WeChat Pay / Alipay), not a conventional direct bank transfer. Listing China here as Bank Transfer will mislead developers who then find the API only accepts MOBILE_MONEY as the payment rail. The same mismatch exists in currencies.ts (allRails: ['Bank Transfer']).
Prompt To Fix With AI
This is a comment left during a code review.
Path: mintlify/snippets/country-support.mdx
Line: 27
Comment:
**Payment rail label contradicts the OpenAPI schema**
The OpenAPI schema for `CnyAccountInfo` (`openapi/components/schemas/common/CnyAccountInfo.yaml`) restricts `paymentRails` to a single enum value: `MOBILE_MONEY`. The account fields (`phoneNumber` + `bankName`) also match a phone-based mobile-money flow (consistent with WeChat Pay / Alipay), not a conventional direct bank transfer. Listing China here as `Bank Transfer` will mislead developers who then find the API only accepts `MOBILE_MONEY` as the payment rail. The same mismatch exists in `currencies.ts` (`allRails: ['Bank Transfer']`).
How can I resolve this? If you propose a fix, please make it concise.| instantRails: [], | ||
| allRails: ['Bank Transfer'], | ||
| examplePerson: { fullName: 'Wei Zhang', nationality: 'CN' }, |
There was a problem hiding this comment.
The OpenAPI schema (
CnyAccountInfo.yaml) restricts paymentRails to MOBILE_MONEY only, so labelling the rail as Bank Transfer here is inconsistent with the API contract. The label should reflect the actual underlying rail (mobile money via WeChat Pay / Alipay) to avoid confusing integrators.
| instantRails: [], | |
| allRails: ['Bank Transfer'], | |
| examplePerson: { fullName: 'Wei Zhang', nationality: 'CN' }, | |
| instantRails: [], | |
| allRails: ['Mobile Money'], | |
| examplePerson: { fullName: 'Wei Zhang', nationality: 'CN' }, |
Prompt To Fix With AI
This is a comment left during a code review.
Path: components/grid-visualizer/src/data/currencies.ts
Line: 274-276
Comment:
The OpenAPI schema (`CnyAccountInfo.yaml`) restricts `paymentRails` to `MOBILE_MONEY` only, so labelling the rail as `Bank Transfer` here is inconsistent with the API contract. The label should reflect the actual underlying rail (mobile money via WeChat Pay / Alipay) to avoid confusing integrators.
```suggestion
instantRails: [],
allRails: ['Mobile Money'],
examplePerson: { fullName: 'Wei Zhang', nationality: 'CN' },
```
How can I resolve this? If you propose a fix, please make it concise.
Summary
CNY_ACCOUNTto Grid Visualizer data files (account-types.ts,currencies.ts)country-support.mdxSyncs documentation and visualizer with CNY_ACCOUNT addition in #552.
Test plan
Bank Transferrail🤖 Generated with Claude Code