chore: Update grid API schemas from webdev#181
chore: Update grid API schemas from webdev#181lightspark-copybara[bot] wants to merge 1 commit intomainfrom
Conversation
Greptile OverviewGreptile SummaryThis PR auto-syncs grid API schemas from webdev, adding new currency-specific account and beneficiary schemas. However, the sync introduced several critical issues: Critical Issues:
Impact: Confidence Score: 0/5
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/common/GbpAccountInfo.yaml | Removed critical accountType discriminator field and validation patterns (pattern, minLength, maxLength, examples) |
| openapi/components/schemas/common/PhpAccountInfo.yaml | Removed critical accountType discriminator field and examples from schema |
| openapi/components/schemas/common/SgdAccountInfo.yaml | Removed critical accountType discriminator field, swiftCode field, and all validation patterns |
| openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml | Added duplicate references creating conflicts (e.g., CAD, GBP, PHP, SGD appear twice with different file names) |
| openapi/components/schemas/common/BrlBeneficiary.yaml | New beneficiary schema added but appears unused (not referenced by external account schemas) |
| openapi/components/schemas/external_accounts/BrlExternalAccountInfo.yaml | New external account schema added, but references generic BeneficiaryOneOf instead of currency-specific beneficiary |
| openapi/components/schemas/external_accounts/CadExternalAccountInfo.yaml | New schema missing required beneficiary field that exists in CadAccountExternalAccountInfo.yaml |
| openapi/components/schemas/external_accounts/GbpExternalAccountInfo.yaml | New schema added, references generic beneficiary instead of currency-specific |
| type: object | ||
| required: | ||
| - sortCode | ||
| - accountNumber | ||
| - accountType | ||
| - sortCode | ||
| - accountNumber | ||
| properties: | ||
| accountType: | ||
| type: string | ||
| enum: | ||
| - GBP_ACCOUNT | ||
| sortCode: | ||
| type: string | ||
| description: UK bank sort code (6 digits, may include hyphens) | ||
| example: '20-00-00' | ||
| pattern: '^[0-9]{2}-?[0-9]{2}-?[0-9]{2}$' | ||
| description: The sort code of the bank | ||
| accountNumber: | ||
| type: string | ||
| description: UK bank account number (8 digits) | ||
| example: '12345678' | ||
| minLength: 8 | ||
| maxLength: 8 | ||
| pattern: ^[0-9]{8}$ | ||
| description: The account number of the bank |
There was a problem hiding this comment.
removed accountType discriminator field which breaks the discriminator mapping in ExternalAccountInfoOneOf.yaml. The old version had accountType: GBP_ACCOUNT which is required for proper OpenAPI discriminator resolution.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/GbpAccountInfo.yaml
Line: 1:11
Comment:
removed `accountType` discriminator field which breaks the discriminator mapping in `ExternalAccountInfoOneOf.yaml`. The old version had `accountType: GBP_ACCOUNT` which is required for proper OpenAPI discriminator resolution.
How can I resolve this? If you propose a fix, please make it concise.| sortCode: | ||
| type: string | ||
| description: UK bank sort code (6 digits, may include hyphens) | ||
| example: '20-00-00' | ||
| pattern: '^[0-9]{2}-?[0-9]{2}-?[0-9]{2}$' | ||
| description: The sort code of the bank | ||
| accountNumber: | ||
| type: string | ||
| description: UK bank account number (8 digits) | ||
| example: '12345678' | ||
| minLength: 8 | ||
| maxLength: 8 | ||
| pattern: ^[0-9]{8}$ | ||
| description: The account number of the bank |
There was a problem hiding this comment.
removed validation patterns, length constraints, and examples that were present in the old version. Old version had pattern, minLength, maxLength, and example fields for proper validation.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/GbpAccountInfo.yaml
Line: 6:11
Comment:
removed validation patterns, length constraints, and examples that were present in the old version. Old version had `pattern`, `minLength`, `maxLength`, and `example` fields for proper validation.
How can I resolve this? If you propose a fix, please make it concise.| type: object | ||
| required: | ||
| - bankName | ||
| - accountNumber | ||
| - accountType | ||
| - bankName | ||
| - accountNumber | ||
| properties: | ||
| accountType: | ||
| type: string | ||
| enum: | ||
| - PHP_ACCOUNT | ||
| bankName: | ||
| type: string | ||
| description: Name of the beneficiary's bank | ||
| example: BDO Unibank | ||
| description: The bank name of the bank | ||
| accountNumber: | ||
| type: string | ||
| description: Bank account number | ||
| example: '001234567890' | ||
| description: The account number of the bank |
There was a problem hiding this comment.
removed accountType discriminator field (PHP_ACCOUNT) which breaks discriminator resolution. Also removed examples that were present in the old version.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/PhpAccountInfo.yaml
Line: 1:11
Comment:
removed `accountType` discriminator field (`PHP_ACCOUNT`) which breaks discriminator resolution. Also removed examples that were present in the old version.
How can I resolve this? If you propose a fix, please make it concise.| type: object | ||
| required: | ||
| - bankName | ||
| - swiftCode | ||
| - accountNumber | ||
| - accountType | ||
| - bankName | ||
| - accountNumber | ||
| properties: | ||
| accountType: | ||
| type: string | ||
| enum: | ||
| - SGD_ACCOUNT | ||
| bankName: | ||
| type: string | ||
| description: Name of the beneficiary's bank | ||
| example: DBS Bank Ltd | ||
| swiftCode: | ||
| type: string | ||
| description: SWIFT/BIC code (8 or 11 characters) | ||
| example: DBSSSGSG | ||
| minLength: 8 | ||
| maxLength: 11 | ||
| pattern: ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$ | ||
| description: The bank name of the bank | ||
| accountNumber: | ||
| type: string | ||
| description: Bank account number | ||
| example: '0123456789' | ||
| description: The account number of the bank |
There was a problem hiding this comment.
removed accountType discriminator field (SGD_ACCOUNT) and the swiftCode field that was required in the old version. Also removed all validation patterns and constraints.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/SgdAccountInfo.yaml
Line: 1:11
Comment:
removed `accountType` discriminator field (`SGD_ACCOUNT`) and the `swiftCode` field that was required in the old version. Also removed all validation patterns and constraints.
How can I resolve this? If you propose a fix, please make it concise.| - title: CAD Account | ||
| $ref: ./CadAccountExternalAccountInfo.yaml | ||
| - title: GBP Account | ||
| $ref: ./GbpAccountExternalAccountInfo.yaml | ||
| - title: PHP Account | ||
| $ref: ./PhpAccountExternalAccountInfo.yaml | ||
| - title: SGD Account |
There was a problem hiding this comment.
duplicate schema references - CadAccountExternalAccountInfo.yaml, GbpAccountExternalAccountInfo.yaml, PhpAccountExternalAccountInfo.yaml, and SgdAccountExternalAccountInfo.yaml are referenced here AND their new counterparts (CadExternalAccountInfo.yaml, etc.) are added below at lines 36-43. Both old and new file versions exist in the repository.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml
Line: 14:20
Comment:
duplicate schema references - `CadAccountExternalAccountInfo.yaml`, `GbpAccountExternalAccountInfo.yaml`, `PhpAccountExternalAccountInfo.yaml`, and `SgdAccountExternalAccountInfo.yaml` are referenced here AND their new counterparts (`CadExternalAccountInfo.yaml`, etc.) are added below at lines 36-43. Both old and new file versions exist in the repository.
How can I resolve this? If you propose a fix, please make it concise.| allOf: | ||
| - $ref: ./BaseExternalAccountInfo.yaml | ||
| - $ref: ../common/CadAccountInfo.yaml |
There was a problem hiding this comment.
missing beneficiary field that exists in the old CadAccountExternalAccountInfo.yaml file. The old version requires a beneficiary with type BeneficiaryOneOf. Check if this omission is intentional.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/CadExternalAccountInfo.yaml
Line: 1:3
Comment:
missing `beneficiary` field that exists in the old `CadAccountExternalAccountInfo.yaml` file. The old version requires a beneficiary with type `BeneficiaryOneOf`. Check if this omission is intentional.
How can I resolve this? If you propose a fix, please make it concise.
Additional Comments (1)
Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml
Line: 78:107
Comment:
duplicate and conflicting discriminator mappings. For example: `CLABE` maps to `ClabeAccountExternalAccountInfo.yaml` at line 78, but `CLABE_ACCOUNT` maps to `ClabeExternalAccountInfo.yaml` at line 94. Similar conflicts exist for PIX/PIX_ACCOUNT, IBAN/IBAN_ACCOUNT, UPI/UPI_ACCOUNT.
How can I resolve this? If you propose a fix, please make it concise. |
Auto-synced grid API schemas from webdev.
These schemas are generated from VASP adapter field definitions in sparkcore.
Synced directories:
common/— per-currency account info and beneficiary schemasexternal_accounts/— per-currency external account schemas (reference common/)Please review the changes before merging.