Skip to content

feat: updating document missing errors to be more specific#297

Merged
pengying merged 1 commit intomainfrom
03-25-feat_updating_document_missing_errors_to_be_more_specific
Mar 25, 2026
Merged

feat: updating document missing errors to be more specific#297
pengying merged 1 commit intomainfrom
03-25-feat_updating_document_missing_errors_to_be_more_specific

Conversation

@pengying
Copy link
Copy Markdown
Contributor

@pengying pengying commented Mar 25, 2026

TL;DR

Refactored verification error types to be more specific and granular, replacing the generic MISSING_DOCUMENT error with category-specific document error types.

What changed?

  • Replaced MISSING_DOCUMENT verification error type with six specific document category types:

    • MISSING_LEGAL_PRESENCE_DOCUMENT
    • MISSING_COMPANY_DETAILS_DOCUMENT
    • MISSING_CONTROL_STRUCTURE_DOCUMENT
    • MISSING_OWNERSHIP_STRUCTURE_DOCUMENT
    • MISSING_PROOF_OF_ADDRESS_DOCUMENT
    • MISSING_IDENTITY_DOCUMENT
  • Enhanced DocumentType schema 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 VerificationError schema to include a mapping table showing which document types are accepted for each error type

  • Simplified accepted document types in examples to only show PROOF_OF_ADDRESS instead of multiple options like UTILITY_BILL and BANK_STATEMENT

  • Fixed bank account number examples to be properly quoted strings (e.g., '0123456789' instead of 123456789)

  • Changed business type in customer creation example from FINTECH to INFORMATION

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
grid-flow-builder Ready Ready Preview, Comment Mar 25, 2026 9:49pm

Request Review

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 25, 2026

✱ Stainless preview builds

This PR will update the grid SDKs with the following commit messages.

kotlin

feat(api): replace MISSING_DOCUMENT with category-specific error types in verifications

openapi

feat(api): add category-specific document error types to VerificationError

python

feat(types): add category-specific document error types to verification responses

typescript

feat(api): add category-specific verification error types to verifications/webhooks
grid-openapi studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅

⚠️ grid-python studio · code

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ✅build ✅lint ❗test ✅

pip install https://pkg.stainless.com/s/grid-python/52af54263e564b007e74f8804bd04824f2ca8889/grid-0.0.1-py3-none-any.whl
grid-kotlin studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅build ✅lint ✅test ✅

⚠️ grid-typescript studio · code

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ✅build ✅lint ❗test ✅

npm install https://pkg.stainless.com/s/grid-typescript/bbffd80baa89351a7d8385e3395abdeb43fa199c/dist.tar.gz

This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-03-25 22:41:28 UTC

@pengying pengying marked this pull request as ready for review March 25, 2026 21:50
minLength: 10
maxLength: 10
example: 0123456789
example: '0123456789'
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@AaryamanBhute I think this fix needs to be at the generator level? Lint complaining

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 25, 2026

Greptile Summary

This PR replaces the single generic MISSING_DOCUMENT verification error type with six granular category-specific types (MISSING_LEGAL_PRESENCE_DOCUMENT, MISSING_COMPANY_DETAILS_DOCUMENT, MISSING_CONTROL_STRUCTURE_DOCUMENT, MISSING_OWNERSHIP_STRUCTURE_DOCUMENT, MISSING_PROOF_OF_ADDRESS_DOCUMENT, MISSING_IDENTITY_DOCUMENT), and enriches the DocumentType and VerificationError schemas with category-to-document-type mapping documentation. It also fixes bank account number examples that were losing leading zeros due to unquoted YAML integers.

  • Broken table formatting (P1): VerificationError.yaml uses a >- folded YAML scalar with blank lines separating table rows. This produces \n\n between rows in the bundled output, causing rows 2–6 of the acceptedDocumentTypes reference table to render as plain text rather than table cells in the generated docs. Switching to |- and removing inter-row blank lines will fix this.
  • Uncategorized document types (P2): Seven values in the DocumentType enum (UTILITY_BILL, BANK_STATEMENT, TAX_RETURN, BUSINESS_LICENSE, POWER_OF_ATTORNEY, SELFIE, OTHER) are not listed under any verification category in the updated description, leaving developers without guidance on when to use them. UTILITY_BILL and BANK_STATEMENT are particularly notable since they were previously listed as accepted proof-of-address types.
  • Bank account number quoting fixes for NGN, PHP, and SGD schemas correctly prevent YAML from interpreting leading zeros as numeric prefixes.
  • businessType example updated from FINTECH to INFORMATION in the customer creation example.

Confidence Score: 4/5

  • Safe to merge after fixing the broken Markdown table formatting in VerificationError.yaml and regenerating bundles.
  • The schema and example changes are correct and well-scoped. The only blocking issue is the >- YAML scalar producing blank lines between table rows in the bundled output, which would cause the reference table to render incorrectly in the published docs. That's a one-line YAML style fix plus a make build. Everything else is clean.
  • openapi/components/schemas/verifications/VerificationError.yaml — YAML scalar style needs to change from >- to |- to fix table rendering.

Important Files Changed

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
Loading
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

Comment on lines 24 to +49
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 |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Suggested change
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.

Comment on lines +22 to 47
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 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.

@pengying pengying merged commit e9198e1 into main Mar 25, 2026
9 checks passed
@pengying pengying deleted the 03-25-feat_updating_document_missing_errors_to_be_more_specific branch March 25, 2026 22:35
kphurley7 pushed a commit to kphurley7/SparkClaude that referenced this pull request Mar 29, 2026
## 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)
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.

2 participants