Skip to content

chore: Update grid API schemas from webdev#181

Closed
lightspark-copybara[bot] wants to merge 1 commit intomainfrom
auto/sync-grid-schemas-20260211-202453
Closed

chore: Update grid API schemas from webdev#181
lightspark-copybara[bot] wants to merge 1 commit intomainfrom
auto/sync-grid-schemas-20260211-202453

Conversation

@lightspark-copybara
Copy link
Contributor

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 schemas
  • external_accounts/ — per-currency external account schemas (reference common/)

Please review the changes before merging.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 11, 2026

Greptile Overview

Greptile Summary

This 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:

  • Duplicate schema files: New files like GbpExternalAccountInfo.yaml were added alongside existing GbpAccountExternalAccountInfo.yaml, creating conflicts in ExternalAccountInfoOneOf.yaml
  • Broken discriminators: Modified *AccountInfo.yaml files (GBP, PHP, SGD) had their accountType discriminator fields removed, breaking OpenAPI discriminator resolution
  • Missing beneficiary fields: Some new external account schemas (e.g., CadExternalAccountInfo.yaml) are missing the required beneficiary field that exists in their old counterparts
  • Lost validation: Modified schemas lost validation patterns, length constraints, and examples (e.g., GbpAccountInfo lost sort code pattern validation)
  • Unused schemas: All 13 new *Beneficiary.yaml files in common/ are not referenced by any external account schemas, which use generic BeneficiaryOneOf instead

Impact:
The discriminator conflicts and missing accountType fields will cause OpenAPI validation failures and runtime errors when deserializing account types.

Confidence Score: 0/5

  • This PR has critical issues that will break the API schema validation
  • Multiple critical issues including duplicate schema references creating discriminator conflicts, removed discriminator fields breaking OpenAPI spec compliance, and missing required fields. These will cause immediate failures in schema validation and runtime deserialization.
  • Pay critical attention to ExternalAccountInfoOneOf.yaml (duplicate references), GbpAccountInfo.yaml, PhpAccountInfo.yaml, SgdAccountInfo.yaml (missing discriminator fields), and all new *ExternalAccountInfo.yaml files (potential missing beneficiary fields)

Important Files Changed

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

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

47 files reviewed, 7 comments

Edit Code Review Agent Settings | Greptile

Comment on lines 1 to +11
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 6 to +11
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 1 to +11
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 1 to +11
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +14 to +20
- title: CAD Account
$ref: ./CadAccountExternalAccountInfo.yaml
- title: GBP Account
$ref: ./GbpAccountExternalAccountInfo.yaml
- title: PHP Account
$ref: ./PhpAccountExternalAccountInfo.yaml
- title: SGD Account
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +1 to +3
allOf:
- $ref: ./BaseExternalAccountInfo.yaml
- $ref: ../common/CadAccountInfo.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 11, 2026

Additional Comments (1)

openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml
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.

Prompt To Fix With AI
This 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant