Add support for MWK, UGX, and XOF currency accounts#240
Conversation
…wi, and Uganda - XOF_ACCOUNT: covers Senegal (SN), Benin (BJ), and Ivory Coast (CI) via mobile money with providers MTN, ORANGE, WAVE, MOOV, FREE - MWK_ACCOUNT: Malawi (MW) mobile money with providers AIRTEL and TNM - UGX_ACCOUNT: Uganda (UG) mobile money with providers MTN and AIRTEL Follows the same pattern as the African currency accounts added in cf847f6. https://claude.ai/code/session_01QxLc91riHT65xhDy4z7Gdt
- RWF: MTN → MTN_Rwanda (removed AIRTEL) - TZS: AIRTEL/VODACOM → AIRTELMONEYTZ, TIGO, HALOPESA - ZMW: TNM/AIRTEL/ZAMTEL/MTN → MTN, TNM, Airtel (removed ZAMTEL) - XOF (Senegal/Benin/Ivory Coast): replace generic enums with correct provider strings per country: Wave, Free, Free Money, Orange Money, Moov, Mtn Mobile Money BJ, Orange, MTN, Moov money, Mtn Mobile Money - MWK: AIRTEL → Airtel https://claude.ai/code/session_01QxLc91riHT65xhDy4z7Gdt
✱ Stainless preview buildsThis PR will update the kotlin openapi python typescript ✅ grid-python studio · code
|
Greptile SummaryThis PR adds OpenAPI schema support for three new mobile money currency accounts — MWK (Malawi), UGX (Uganda), and XOF (West African CFA Franc / Senegal, Benin, Ivory Coast) — following the existing modular pattern with Key changes:
Issue found:
Confidence Score: 2/5
Last reviewed commit: 6846928 |
…unts Provider values are driven by a third-party and change frequently, so an enum on the API surface is impractical. Affects KES, RWF, TZS, ZMW, XOF, MWK, and UGX account schemas. https://claude.ai/code/session_01QxLc91riHT65xhDy4z7Gdt
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
| type: string | ||
| description: West African mobile money phone number (Senegal, Benin, or Ivory Coast) | ||
| example: '+221781234567' | ||
| pattern: ^\+(221|225|229)[0-9]{8,10}$ |
There was a problem hiding this comment.
XOF phone pattern mismatch between source and compiled files
The compiled openapi.yaml (and mintlify/openapi.yaml) contains the looser pattern:
^\+(221|225|229)[0-9]{8,10}$
However, the source file openapi/components/schemas/common/XofAccountInfo.yaml (line 31) contains the more precise per-country pattern:
^\+(221[0-9]{9}|225[0-9]{10}|229[0-9]{8,9})$
The compiled files are out of sync with the source. Since API consumers read openapi.yaml directly, the less-precise pattern is what will actually be enforced at validation time. The looser pattern incorrectly accepts:
- Senegal (
+221) with 8 or 10 digits (should be exactly 9) - Ivory Coast (
+225) with 8 or 9 digits (should be exactly 10) - Benin (
+229) with 10 digits (should be 8 or 9)
The compiled files need to be regenerated from the updated source to enforce the per-country digit counts. The same discrepancy exists in mintlify/openapi.yaml at the equivalent line.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi.yaml
Line: 6888
Comment:
**XOF phone pattern mismatch between source and compiled files**
The compiled `openapi.yaml` (and `mintlify/openapi.yaml`) contains the looser pattern:
```
^\+(221|225|229)[0-9]{8,10}$
```
However, the source file `openapi/components/schemas/common/XofAccountInfo.yaml` (line 31) contains the more precise per-country pattern:
```
^\+(221[0-9]{9}|225[0-9]{10}|229[0-9]{8,9})$
```
The compiled files are out of sync with the source. Since API consumers read `openapi.yaml` directly, the less-precise pattern is what will actually be enforced at validation time. The looser pattern incorrectly accepts:
- Senegal (`+221`) with 8 or 10 digits (should be exactly 9)
- Ivory Coast (`+225`) with 8 or 9 digits (should be exactly 10)
- Benin (`+229`) with 10 digits (should be 8 or 9)
The compiled files need to be regenerated from the updated source to enforce the per-country digit counts. The same discrepancy exists in `mintlify/openapi.yaml` at the equivalent line.
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
ah shucks, I even fixed it to this
Summary
This PR adds OpenAPI schema definitions for three new currency account types: Malawian Kwacha (MWK), Ugandan Shilling (UGX), and West African CFA Franc (XOF). Each currency includes mobile money payment rail support with region-specific phone number validation and provider configurations.
Key Changes
^\+265[0-9]{9}$^\+256[0-9]{9}$^\+(221|225|229)[0-9]{8,10}$ExternalAccountTypeenum to includeMWK_ACCOUNT,UGX_ACCOUNT, andXOF_ACCOUNTExternalAccountInfoOneOfdiscriminator mapping to route new account types to their respective schemasImplementation Details
AccountInfo,Beneficiary, andExternalAccountInfoschema componentshttps://claude.ai/code/session_01QxLc91riHT65xhDy4z7Gdt