Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✱ Stainless preview buildsThis PR will update the kotlin openapi python typescript
|
| minLength: 10 | ||
| maxLength: 10 | ||
| example: 0123456789 | ||
| example: '0123456789' |
There was a problem hiding this comment.
@AaryamanBhute I think this fix needs to be at the generator level? Lint complaining
Greptile SummaryThis PR replaces the single generic
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/verifications/VerificationError.yaml | Adds an acceptedDocumentTypes mapping table — but the >- YAML scalar with blank lines between rows produces broken Markdown in the bundled output; rows 2–6 render as plain text instead of table cells. |
| openapi/components/schemas/verifications/VerificationErrorType.yaml | Replaces the single MISSING_DOCUMENT enum value with six granular category-specific values; description updated clearly. Clean change. |
| openapi/components/schemas/documents/DocumentType.yaml | Adds useful per-category groupings to the description, but seven enum values (UTILITY_BILL, BANK_STATEMENT, TAX_RETURN, BUSINESS_LICENSE, POWER_OF_ATTORNEY, SELFIE, OTHER) are left uncategorized with no guidance for developers. |
| openapi/components/schemas/common/NgnAccountInfo.yaml | Quotes the bank account number example to prevent YAML from stripping the leading zero — correct fix. |
| openapi/components/schemas/common/PhpAccountInfo.yaml | Quotes the bank account number example to prevent leading-zero stripping — correct fix. |
| openapi/components/schemas/common/SgdAccountInfo.yaml | Quotes the bank account number example to prevent leading-zero stripping — correct fix. |
| openapi/paths/customers/customers.yaml | Updates businessType example from FINTECH to INFORMATION — straightforward example correction. |
| openapi/paths/verifications/verifications.yaml | Updates verification error example to use MISSING_PROOF_OF_ADDRESS_DOCUMENT and simplified acceptedDocumentTypes — consistent with schema changes. |
| openapi/webhooks/verification-update.yaml | Updates webhook example to mirror the verification error type rename — consistent with schema changes. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[VerificationError] --> B{type}
B --> C[MISSING_FIELD]
B --> D[INVALID_FIELD]
B --> E[MISSING_BENEFICIAL_OWNER]
B --> F[INVALID_DOCUMENT]
B --> G[EXPIRED_DOCUMENT]
B --> H[MISSING_LEGAL_PRESENCE_DOCUMENT]
B --> I[MISSING_COMPANY_DETAILS_DOCUMENT]
B --> J[MISSING_CONTROL_STRUCTURE_DOCUMENT]
B --> K[MISSING_OWNERSHIP_STRUCTURE_DOCUMENT]
B --> L[MISSING_PROOF_OF_ADDRESS_DOCUMENT]
B --> M[MISSING_IDENTITY_DOCUMENT]
H -->|acceptedDocumentTypes| H1["CERTIFICATE_OF_INCORPORATION\nARTICLES_OF_INCORPORATION\nARTICLES_OF_ASSOCIATION\nSTATE_REGISTRY_EXCERPT"]
I -->|acceptedDocumentTypes| I1["INFORMATION_STATEMENT\nSTATE_REGISTRY_EXCERPT\nARTICLES_OF_INCORPORATION\nARTICLES_OF_ASSOCIATION\nCERTIFICATE_OF_INCORPORATION\nINCUMBENCY_CERTIFICATE\nGOOD_STANDING_CERTIFICATE"]
J -->|acceptedDocumentTypes| J1["ARTICLES_OF_INCORPORATION\nARTICLES_OF_ASSOCIATION\nINCUMBENCY_CERTIFICATE\nINFORMATION_STATEMENT\nSTATE_REGISTRY_EXCERPT"]
K -->|acceptedDocumentTypes| K1["SHAREHOLDER_REGISTER\nINFORMATION_STATEMENT\nINCUMBENCY_CERTIFICATE\nSTATE_REGISTRY_EXCERPT\nARTICLES_OF_INCORPORATION\nARTICLES_OF_ASSOCIATION"]
L -->|acceptedDocumentTypes| L1["PROOF_OF_ADDRESS"]
M -->|acceptedDocumentTypes| M1["PASSPORT\nDRIVERS_LICENSE\nNATIONAL_ID"]
style H fill:#f9f,stroke:#333
style I fill:#f9f,stroke:#333
style J fill:#f9f,stroke:#333
style K fill:#f9f,stroke:#333
style L fill:#f9f,stroke:#333
style M fill:#f9f,stroke:#333
Prompt To Fix All With AI
This is a comment left during a code review.
Path: openapi/components/schemas/verifications/VerificationError.yaml
Line: 24-49
Comment:
**Broken Markdown table due to `>-` folded YAML scalar**
The `>-` (folded) block scalar folds line breaks between non-empty lines into spaces and converts individual blank lines into literal newlines. Because there is one blank line between each table row in this source file (e.g. lines 36, 38, 40, 42, 44, 46, 48), the output string has a `\n` (single newline → blank line) separating every row from the next. The bundled `openapi.yaml` and `mintlify/openapi.yaml` confirm this — they serialize the result as a `|-` (literal) block and show blank lines between rows 1–2, 2–3, etc. In standard Markdown, a blank line between table rows terminates the table, so rows 2–6 render as paragraph text rather than table cells.
Switch to `|-` (literal block scalar) and remove the blank lines between table rows so they remain consecutive:
```suggestion
description: |-
Document types that would satisfy this requirement. The integrator
can upload any one of the listed types. Present when type is
MISSING_LEGAL_PRESENCE_DOCUMENT, MISSING_COMPANY_DETAILS_DOCUMENT,
MISSING_CONTROL_STRUCTURE_DOCUMENT, MISSING_OWNERSHIP_STRUCTURE_DOCUMENT,
MISSING_PROOF_OF_ADDRESS_DOCUMENT, MISSING_IDENTITY_DOCUMENT, INVALID_DOCUMENT, or EXPIRED_DOCUMENT.
| Error Type | Accepted Document Types |
|---|---|
| MISSING_LEGAL_PRESENCE_DOCUMENT | CERTIFICATE_OF_INCORPORATION, ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION, STATE_REGISTRY_EXCERPT |
| MISSING_COMPANY_DETAILS_DOCUMENT | INFORMATION_STATEMENT, STATE_REGISTRY_EXCERPT, ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION, CERTIFICATE_OF_INCORPORATION, INCUMBENCY_CERTIFICATE, GOOD_STANDING_CERTIFICATE |
| MISSING_CONTROL_STRUCTURE_DOCUMENT | ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION, INCUMBENCY_CERTIFICATE, INFORMATION_STATEMENT, STATE_REGISTRY_EXCERPT |
| MISSING_OWNERSHIP_STRUCTURE_DOCUMENT | SHAREHOLDER_REGISTER, INFORMATION_STATEMENT, INCUMBENCY_CERTIFICATE, STATE_REGISTRY_EXCERPT, ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION |
| MISSING_PROOF_OF_ADDRESS_DOCUMENT | PROOF_OF_ADDRESS |
| MISSING_IDENTITY_DOCUMENT | PASSPORT, DRIVERS_LICENSE, NATIONAL_ID |
```
After making this source change, re-run `make build` to regenerate the bundles.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: openapi/components/schemas/documents/DocumentType.yaml
Line: 22-47
Comment:
**Several enum values not assigned to a verification category**
Seven document types in the `DocumentType` enum are not listed under any verification category in the updated description: `BANK_STATEMENT`, `TAX_RETURN`, `BUSINESS_LICENSE`, `POWER_OF_ATTORNEY`, `UTILITY_BILL`, `SELFIE`, and `OTHER`.
This is particularly noticeable for `UTILITY_BILL` and `BANK_STATEMENT`, which were previously listed as accepted proof-of-address document types in the API response examples (now removed in this PR). Developers scanning this description for guidance on what to upload will have no indication of when (if ever) these document types are appropriate.
If these document types are still accepted by the API for any error category, please add them to the relevant category. If they are genuinely unused or deprecated, consider adding a note explaining their status (e.g., "legacy types, no longer accepted by any verification requirement").
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "feat: updating document missing errors t..." | Re-trigger Greptile
| description: >- | ||
| Document types that would satisfy this requirement. The integrator | ||
| can upload any one of the listed types. Present when type is | ||
| MISSING_DOCUMENT, INVALID_DOCUMENT, or EXPIRED_DOCUMENT. | ||
| MISSING_LEGAL_PRESENCE_DOCUMENT, | ||
| MISSING_COMPANY_DETAILS_DOCUMENT, | ||
| MISSING_CONTROL_STRUCTURE_DOCUMENT, | ||
| MISSING_OWNERSHIP_STRUCTURE_DOCUMENT, | ||
| MISSING_PROOF_OF_ADDRESS_DOCUMENT, | ||
| MISSING_IDENTITY_DOCUMENT, INVALID_DOCUMENT, or EXPIRED_DOCUMENT. | ||
|
|
||
|
|
||
| | Error Type | Accepted Document Types | | ||
|
|
||
| |---|---| | ||
|
|
||
| | MISSING_LEGAL_PRESENCE_DOCUMENT | CERTIFICATE_OF_INCORPORATION, ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION, STATE_REGISTRY_EXCERPT | | ||
|
|
||
| | MISSING_COMPANY_DETAILS_DOCUMENT | INFORMATION_STATEMENT, STATE_REGISTRY_EXCERPT, ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION, CERTIFICATE_OF_INCORPORATION, INCUMBENCY_CERTIFICATE, GOOD_STANDING_CERTIFICATE | | ||
|
|
||
| | MISSING_CONTROL_STRUCTURE_DOCUMENT | ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION, INCUMBENCY_CERTIFICATE, INFORMATION_STATEMENT, STATE_REGISTRY_EXCERPT | | ||
|
|
||
| | MISSING_OWNERSHIP_STRUCTURE_DOCUMENT | SHAREHOLDER_REGISTER, INFORMATION_STATEMENT, INCUMBENCY_CERTIFICATE, STATE_REGISTRY_EXCERPT, ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION | | ||
|
|
||
| | MISSING_PROOF_OF_ADDRESS_DOCUMENT | PROOF_OF_ADDRESS | | ||
|
|
||
| | MISSING_IDENTITY_DOCUMENT | PASSPORT, DRIVERS_LICENSE, NATIONAL_ID | |
There was a problem hiding this comment.
Broken Markdown table due to
>- folded YAML scalar
The >- (folded) block scalar folds line breaks between non-empty lines into spaces and converts individual blank lines into literal newlines. Because there is one blank line between each table row in this source file (e.g. lines 36, 38, 40, 42, 44, 46, 48), the output string has a \n (single newline → blank line) separating every row from the next. The bundled openapi.yaml and mintlify/openapi.yaml confirm this — they serialize the result as a |- (literal) block and show blank lines between rows 1–2, 2–3, etc. In standard Markdown, a blank line between table rows terminates the table, so rows 2–6 render as paragraph text rather than table cells.
Switch to |- (literal block scalar) and remove the blank lines between table rows so they remain consecutive:
| description: >- | |
| Document types that would satisfy this requirement. The integrator | |
| can upload any one of the listed types. Present when type is | |
| MISSING_DOCUMENT, INVALID_DOCUMENT, or EXPIRED_DOCUMENT. | |
| MISSING_LEGAL_PRESENCE_DOCUMENT, | |
| MISSING_COMPANY_DETAILS_DOCUMENT, | |
| MISSING_CONTROL_STRUCTURE_DOCUMENT, | |
| MISSING_OWNERSHIP_STRUCTURE_DOCUMENT, | |
| MISSING_PROOF_OF_ADDRESS_DOCUMENT, | |
| MISSING_IDENTITY_DOCUMENT, INVALID_DOCUMENT, or EXPIRED_DOCUMENT. | |
| | Error Type | Accepted Document Types | | |
| |---|---| | |
| | MISSING_LEGAL_PRESENCE_DOCUMENT | CERTIFICATE_OF_INCORPORATION, ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION, STATE_REGISTRY_EXCERPT | | |
| | MISSING_COMPANY_DETAILS_DOCUMENT | INFORMATION_STATEMENT, STATE_REGISTRY_EXCERPT, ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION, CERTIFICATE_OF_INCORPORATION, INCUMBENCY_CERTIFICATE, GOOD_STANDING_CERTIFICATE | | |
| | MISSING_CONTROL_STRUCTURE_DOCUMENT | ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION, INCUMBENCY_CERTIFICATE, INFORMATION_STATEMENT, STATE_REGISTRY_EXCERPT | | |
| | MISSING_OWNERSHIP_STRUCTURE_DOCUMENT | SHAREHOLDER_REGISTER, INFORMATION_STATEMENT, INCUMBENCY_CERTIFICATE, STATE_REGISTRY_EXCERPT, ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION | | |
| | MISSING_PROOF_OF_ADDRESS_DOCUMENT | PROOF_OF_ADDRESS | | |
| | MISSING_IDENTITY_DOCUMENT | PASSPORT, DRIVERS_LICENSE, NATIONAL_ID | | |
| description: |- | |
| Document types that would satisfy this requirement. The integrator | |
| can upload any one of the listed types. Present when type is | |
| MISSING_LEGAL_PRESENCE_DOCUMENT, MISSING_COMPANY_DETAILS_DOCUMENT, | |
| MISSING_CONTROL_STRUCTURE_DOCUMENT, MISSING_OWNERSHIP_STRUCTURE_DOCUMENT, | |
| MISSING_PROOF_OF_ADDRESS_DOCUMENT, MISSING_IDENTITY_DOCUMENT, INVALID_DOCUMENT, or EXPIRED_DOCUMENT. | |
| | Error Type | Accepted Document Types | | |
| |---|---| | |
| | MISSING_LEGAL_PRESENCE_DOCUMENT | CERTIFICATE_OF_INCORPORATION, ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION, STATE_REGISTRY_EXCERPT | | |
| | MISSING_COMPANY_DETAILS_DOCUMENT | INFORMATION_STATEMENT, STATE_REGISTRY_EXCERPT, ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION, CERTIFICATE_OF_INCORPORATION, INCUMBENCY_CERTIFICATE, GOOD_STANDING_CERTIFICATE | | |
| | MISSING_CONTROL_STRUCTURE_DOCUMENT | ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION, INCUMBENCY_CERTIFICATE, INFORMATION_STATEMENT, STATE_REGISTRY_EXCERPT | | |
| | MISSING_OWNERSHIP_STRUCTURE_DOCUMENT | SHAREHOLDER_REGISTER, INFORMATION_STATEMENT, INCUMBENCY_CERTIFICATE, STATE_REGISTRY_EXCERPT, ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION | | |
| | MISSING_PROOF_OF_ADDRESS_DOCUMENT | PROOF_OF_ADDRESS | | |
| | MISSING_IDENTITY_DOCUMENT | PASSPORT, DRIVERS_LICENSE, NATIONAL_ID | |
After making this source change, re-run make build to regenerate the bundles.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/verifications/VerificationError.yaml
Line: 24-49
Comment:
**Broken Markdown table due to `>-` folded YAML scalar**
The `>-` (folded) block scalar folds line breaks between non-empty lines into spaces and converts individual blank lines into literal newlines. Because there is one blank line between each table row in this source file (e.g. lines 36, 38, 40, 42, 44, 46, 48), the output string has a `\n` (single newline → blank line) separating every row from the next. The bundled `openapi.yaml` and `mintlify/openapi.yaml` confirm this — they serialize the result as a `|-` (literal) block and show blank lines between rows 1–2, 2–3, etc. In standard Markdown, a blank line between table rows terminates the table, so rows 2–6 render as paragraph text rather than table cells.
Switch to `|-` (literal block scalar) and remove the blank lines between table rows so they remain consecutive:
```suggestion
description: |-
Document types that would satisfy this requirement. The integrator
can upload any one of the listed types. Present when type is
MISSING_LEGAL_PRESENCE_DOCUMENT, MISSING_COMPANY_DETAILS_DOCUMENT,
MISSING_CONTROL_STRUCTURE_DOCUMENT, MISSING_OWNERSHIP_STRUCTURE_DOCUMENT,
MISSING_PROOF_OF_ADDRESS_DOCUMENT, MISSING_IDENTITY_DOCUMENT, INVALID_DOCUMENT, or EXPIRED_DOCUMENT.
| Error Type | Accepted Document Types |
|---|---|
| MISSING_LEGAL_PRESENCE_DOCUMENT | CERTIFICATE_OF_INCORPORATION, ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION, STATE_REGISTRY_EXCERPT |
| MISSING_COMPANY_DETAILS_DOCUMENT | INFORMATION_STATEMENT, STATE_REGISTRY_EXCERPT, ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION, CERTIFICATE_OF_INCORPORATION, INCUMBENCY_CERTIFICATE, GOOD_STANDING_CERTIFICATE |
| MISSING_CONTROL_STRUCTURE_DOCUMENT | ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION, INCUMBENCY_CERTIFICATE, INFORMATION_STATEMENT, STATE_REGISTRY_EXCERPT |
| MISSING_OWNERSHIP_STRUCTURE_DOCUMENT | SHAREHOLDER_REGISTER, INFORMATION_STATEMENT, INCUMBENCY_CERTIFICATE, STATE_REGISTRY_EXCERPT, ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION |
| MISSING_PROOF_OF_ADDRESS_DOCUMENT | PROOF_OF_ADDRESS |
| MISSING_IDENTITY_DOCUMENT | PASSPORT, DRIVERS_LICENSE, NATIONAL_ID |
```
After making this source change, re-run `make build` to regenerate the bundles.
How can I resolve this? If you propose a fix, please make it concise.| description: >- | ||
| Type of identity or business verification document. Document types are | ||
| grouped by verification category: | ||
|
|
||
| **Identity** — PASSPORT, DRIVERS_LICENSE, NATIONAL_ID | ||
|
|
||
| **Business — Legal presence** — CERTIFICATE_OF_INCORPORATION, | ||
| ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION, | ||
| STATE_REGISTRY_EXCERPT | ||
|
|
||
| **Business — Company details** — INFORMATION_STATEMENT, | ||
| STATE_REGISTRY_EXCERPT, ARTICLES_OF_INCORPORATION, | ||
| ARTICLES_OF_ASSOCIATION, CERTIFICATE_OF_INCORPORATION, | ||
| INCUMBENCY_CERTIFICATE, GOOD_STANDING_CERTIFICATE | ||
|
|
||
| **Business — Control structure** — ARTICLES_OF_INCORPORATION, | ||
| ARTICLES_OF_ASSOCIATION, INCUMBENCY_CERTIFICATE, | ||
| INFORMATION_STATEMENT, STATE_REGISTRY_EXCERPT | ||
|
|
||
| **Business — Ownership structure** — SHAREHOLDER_REGISTER, | ||
| INFORMATION_STATEMENT, INCUMBENCY_CERTIFICATE, | ||
| STATE_REGISTRY_EXCERPT, ARTICLES_OF_INCORPORATION, | ||
| ARTICLES_OF_ASSOCIATION | ||
|
|
||
| **Proof of address** — PROOF_OF_ADDRESS | ||
| example: PASSPORT |
There was a problem hiding this comment.
Several enum values not assigned to a verification category
Seven document types in the DocumentType enum are not listed under any verification category in the updated description: BANK_STATEMENT, TAX_RETURN, BUSINESS_LICENSE, POWER_OF_ATTORNEY, UTILITY_BILL, SELFIE, and OTHER.
This is particularly noticeable for UTILITY_BILL and BANK_STATEMENT, which were previously listed as accepted proof-of-address document types in the API response examples (now removed in this PR). Developers scanning this description for guidance on what to upload will have no indication of when (if ever) these document types are appropriate.
If these document types are still accepted by the API for any error category, please add them to the relevant category. If they are genuinely unused or deprecated, consider adding a note explaining their status (e.g., "legacy types, no longer accepted by any verification requirement").
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/documents/DocumentType.yaml
Line: 22-47
Comment:
**Several enum values not assigned to a verification category**
Seven document types in the `DocumentType` enum are not listed under any verification category in the updated description: `BANK_STATEMENT`, `TAX_RETURN`, `BUSINESS_LICENSE`, `POWER_OF_ATTORNEY`, `UTILITY_BILL`, `SELFIE`, and `OTHER`.
This is particularly noticeable for `UTILITY_BILL` and `BANK_STATEMENT`, which were previously listed as accepted proof-of-address document types in the API response examples (now removed in this PR). Developers scanning this description for guidance on what to upload will have no indication of when (if ever) these document types are appropriate.
If these document types are still accepted by the API for any error category, please add them to the relevant category. If they are genuinely unused or deprecated, consider adding a note explaining their status (e.g., "legacy types, no longer accepted by any verification requirement").
How can I resolve this? If you propose a fix, please make it concise.## Summary - Adds a custom YAML dumper (`_QuotedStringDumper`) to `generate_accounts.py` that forces single-quoted style for digit-only strings with a leading zero (e.g. `'0123456789'`) - Prevents YAML 1.1 parsers from misinterpreting these values as octal numbers or dropping the leading zero - Affects generated schemas for NGN, SGD, and PHP account info files Addresses review feedback from @pengying on lightsparkdev/grid-api#297 to fix at the generator level rather than manually editing generated YAML files. ## Test plan - [x] Verified the custom representer correctly quotes leading-zero digit strings - [x] Verified non-leading-zero strings, alphanumeric strings, and regex patterns are unaffected - [ ] Re-run `python -m sparkcore.scripts.grid.generate_accounts` and verify the generated YAML files have properly quoted examples 🤖 Generated with [Claude Code](https://claude.com/claude-code)

TL;DR
Refactored verification error types to be more specific and granular, replacing the generic
MISSING_DOCUMENTerror with category-specific document error types.What changed?
Replaced
MISSING_DOCUMENTverification error type with six specific document category types:MISSING_LEGAL_PRESENCE_DOCUMENTMISSING_COMPANY_DETAILS_DOCUMENTMISSING_CONTROL_STRUCTURE_DOCUMENTMISSING_OWNERSHIP_STRUCTURE_DOCUMENTMISSING_PROOF_OF_ADDRESS_DOCUMENTMISSING_IDENTITY_DOCUMENTEnhanced
DocumentTypeschema with detailed categorization showing which document types belong to each verification category (Identity, Business Legal presence, Company details, Control structure, Ownership structure, Proof of address)Updated
VerificationErrorschema to include a mapping table showing which document types are accepted for each error typeSimplified accepted document types in examples to only show
PROOF_OF_ADDRESSinstead of multiple options likeUTILITY_BILLandBANK_STATEMENTFixed bank account number examples to be properly quoted strings (e.g.,
'0123456789'instead of123456789)Changed business type in customer creation example from
FINTECHtoINFORMATION