Revert "docs(documents): split document upload by identity vs non-identity"#523
Conversation
…ntity" This reverts commit 560e4c2.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
✱ Stainless preview builds for gridThis PR will update the cli csharp go kotlin openapi php python ruby typescript
|
Greptile SummaryThis PR reverts the split of
Confidence Score: 4/5Safe to merge — a clean revert with no logic changes; the only gaps are missing schema descriptions and identity-centric wording on shared fields. The revert is structurally sound:
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/documents/BaseDocumentRequest.yaml | Now includes documentType (required), documentNumber, and issuingAuthority as shared fields; examples/descriptions are identity-document-centric despite applying to all document types |
| openapi/components/schemas/documents/DocumentUploadRequest.yaml | Reverted to simple allOf over BaseDocumentRequest plus required documentHolder; description field removed from the schema |
| openapi/components/schemas/documents/DocumentReplaceRequest.yaml | Now just a titled allOf wrapper over BaseDocumentRequest with no extra properties and no description; intentionally omits documentHolder since replacement targets an existing document |
| openapi/components/schemas/documents/IdentityDocumentUploadRequest.yaml | Deleted as part of the revert; was previously the identity-specific upload schema |
| openapi/components/schemas/documents/IdentityDocumentReplaceRequest.yaml | Deleted as part of the revert; was previously the identity-specific replace schema |
| openapi/components/schemas/documents/IdentityDocumentType.yaml | Deleted; values (PASSPORT, DRIVERS_LICENSE, NATIONAL_ID) are now folded into the existing unified DocumentType enum |
| openapi/components/schemas/documents/NonIdentityDocumentUploadRequest.yaml | Deleted as part of the revert; was previously the non-identity upload schema |
| openapi/components/schemas/documents/NonIdentityDocumentReplaceRequest.yaml | Deleted as part of the revert; was previously the non-identity replace schema |
| openapi/components/schemas/documents/NonIdentityDocumentType.yaml | Deleted; values are preserved in the existing unified DocumentType enum |
| openapi.yaml | Re-bundled to reflect schema revert; mirrors source schema changes correctly |
| mintlify/openapi.yaml | Re-bundled Mintlify copy; mirrors source schema changes correctly |
Class Diagram
%%{init: {'theme': 'neutral'}}%%
classDiagram
class BaseDocumentRequest {
+binary file
+DocumentType documentType
+string country
+string side
+string documentNumber
+string issuingAuthority
}
class DocumentUploadRequest {
+string documentHolder
}
class DocumentReplaceRequest {
}
class DocumentType {
<<enumeration>>
PASSPORT
DRIVERS_LICENSE
NATIONAL_ID
PROOF_OF_ADDRESS
UTILITY_BILL
CERTIFICATE_OF_INCORPORATION
}
DocumentUploadRequest --|> BaseDocumentRequest
DocumentReplaceRequest --|> BaseDocumentRequest
BaseDocumentRequest --> DocumentType
Prompt To Fix All With AI
Fix the following 3 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 3
openapi/components/schemas/documents/BaseDocumentRequest.yaml:24-31
The `documentNumber` and `issuingAuthority` fields are now shared across all document types (both identity and non-identity), but their descriptions and examples remain identity-document-specific. Callers uploading a `CERTIFICATE_OF_INCORPORATION` or `UTILITY_BILL` will see "e.g., passport number" and "U.S. Department of State" as guidance — which is confusing. The old non-identity schemas used more neutral wording. Consider updating both to be generic enough to cover all document categories.
```suggestion
documentNumber:
type: string
description: Document identification number (e.g., passport number, document reference)
example: A12345678
issuingAuthority:
type: string
description: Name of the agency or organization that issued the document
example: U.S. Department of State
```
### Issue 2 of 3
openapi/components/schemas/documents/DocumentUploadRequest.yaml:1-2
The `description` field was dropped during the revert. The old `DocumentUploadRequest` had `description: Upload a verification document.`. Without it, rendered API docs (Mintlify/Redocly) will show no description for this schema, which hurts discoverability.
```suggestion
title: Document Upload Request
description: Upload a verification document.
allOf:
```
### Issue 3 of 3
openapi/components/schemas/documents/DocumentReplaceRequest.yaml:1-2
Same as `DocumentUploadRequest` — the `description` field was removed during the revert. Without it, rendered docs will show no description for this schema.
```suggestion
title: Document Replace Request
description: Replace an existing document.
allOf:
```
Reviews (1): Last reviewed commit: "Revert "docs(documents): split document ..." | Re-trigger Greptile
| documentNumber: | ||
| type: string | ||
| description: Document identification number (e.g., passport number) | ||
| example: A12345678 | ||
| issuingAuthority: | ||
| type: string | ||
| description: Name of the government agency or organization that issued the document | ||
| example: U.S. Department of State |
There was a problem hiding this comment.
The
documentNumber and issuingAuthority fields are now shared across all document types (both identity and non-identity), but their descriptions and examples remain identity-document-specific. Callers uploading a CERTIFICATE_OF_INCORPORATION or UTILITY_BILL will see "e.g., passport number" and "U.S. Department of State" as guidance — which is confusing. The old non-identity schemas used more neutral wording. Consider updating both to be generic enough to cover all document categories.
| documentNumber: | |
| type: string | |
| description: Document identification number (e.g., passport number) | |
| example: A12345678 | |
| issuingAuthority: | |
| type: string | |
| description: Name of the government agency or organization that issued the document | |
| example: U.S. Department of State | |
| documentNumber: | |
| type: string | |
| description: Document identification number (e.g., passport number, document reference) | |
| example: A12345678 | |
| issuingAuthority: | |
| type: string | |
| description: Name of the agency or organization that issued the document | |
| example: U.S. Department of State |
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/documents/BaseDocumentRequest.yaml
Line: 24-31
Comment:
The `documentNumber` and `issuingAuthority` fields are now shared across all document types (both identity and non-identity), but their descriptions and examples remain identity-document-specific. Callers uploading a `CERTIFICATE_OF_INCORPORATION` or `UTILITY_BILL` will see "e.g., passport number" and "U.S. Department of State" as guidance — which is confusing. The old non-identity schemas used more neutral wording. Consider updating both to be generic enough to cover all document categories.
```suggestion
documentNumber:
type: string
description: Document identification number (e.g., passport number, document reference)
example: A12345678
issuingAuthority:
type: string
description: Name of the agency or organization that issued the document
example: U.S. Department of State
```
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| title: Document Upload Request | ||
| description: Upload a verification document. | ||
| oneOf: | ||
| - $ref: ./IdentityDocumentUploadRequest.yaml | ||
| - $ref: ./NonIdentityDocumentUploadRequest.yaml | ||
| discriminator: | ||
| propertyName: documentType | ||
| mapping: | ||
| PASSPORT: ./IdentityDocumentUploadRequest.yaml | ||
| DRIVERS_LICENSE: ./IdentityDocumentUploadRequest.yaml | ||
| NATIONAL_ID: ./IdentityDocumentUploadRequest.yaml | ||
| PROOF_OF_ADDRESS: ./NonIdentityDocumentUploadRequest.yaml | ||
| BANK_STATEMENT: ./NonIdentityDocumentUploadRequest.yaml | ||
| TAX_RETURN: ./NonIdentityDocumentUploadRequest.yaml | ||
| CERTIFICATE_OF_INCORPORATION: ./NonIdentityDocumentUploadRequest.yaml | ||
| ARTICLES_OF_INCORPORATION: ./NonIdentityDocumentUploadRequest.yaml | ||
| ARTICLES_OF_ASSOCIATION: ./NonIdentityDocumentUploadRequest.yaml | ||
| STATE_REGISTRY_EXCERPT: ./NonIdentityDocumentUploadRequest.yaml | ||
| GOOD_STANDING_CERTIFICATE: ./NonIdentityDocumentUploadRequest.yaml | ||
| INFORMATION_STATEMENT: ./NonIdentityDocumentUploadRequest.yaml | ||
| INCUMBENCY_CERTIFICATE: ./NonIdentityDocumentUploadRequest.yaml | ||
| BUSINESS_LICENSE: ./NonIdentityDocumentUploadRequest.yaml | ||
| SHAREHOLDER_REGISTER: ./NonIdentityDocumentUploadRequest.yaml | ||
| POWER_OF_ATTORNEY: ./NonIdentityDocumentUploadRequest.yaml | ||
| UTILITY_BILL: ./NonIdentityDocumentUploadRequest.yaml | ||
| ELECTRICITY_BILL: ./NonIdentityDocumentUploadRequest.yaml | ||
| RENT_OR_LEASE_AGREEMENT: ./NonIdentityDocumentUploadRequest.yaml | ||
| DIRECTOR_REGISTRY: ./NonIdentityDocumentUploadRequest.yaml | ||
| TRUST_AGREEMENT: ./NonIdentityDocumentUploadRequest.yaml | ||
| STATE_COMPANY_REGISTRY: ./NonIdentityDocumentUploadRequest.yaml | ||
| PARTNERSHIP_CONTROL_AGREEMENT: ./NonIdentityDocumentUploadRequest.yaml | ||
| PARTNERSHIP_AGREEMENT: ./NonIdentityDocumentUploadRequest.yaml | ||
| SELFIE: ./NonIdentityDocumentUploadRequest.yaml | ||
| OTHER: ./NonIdentityDocumentUploadRequest.yaml | ||
| allOf: |
There was a problem hiding this comment.
The
description field was dropped during the revert. The old DocumentUploadRequest had description: Upload a verification document.. Without it, rendered API docs (Mintlify/Redocly) will show no description for this schema, which hurts discoverability.
| title: Document Upload Request | |
| description: Upload a verification document. | |
| oneOf: | |
| - $ref: ./IdentityDocumentUploadRequest.yaml | |
| - $ref: ./NonIdentityDocumentUploadRequest.yaml | |
| discriminator: | |
| propertyName: documentType | |
| mapping: | |
| PASSPORT: ./IdentityDocumentUploadRequest.yaml | |
| DRIVERS_LICENSE: ./IdentityDocumentUploadRequest.yaml | |
| NATIONAL_ID: ./IdentityDocumentUploadRequest.yaml | |
| PROOF_OF_ADDRESS: ./NonIdentityDocumentUploadRequest.yaml | |
| BANK_STATEMENT: ./NonIdentityDocumentUploadRequest.yaml | |
| TAX_RETURN: ./NonIdentityDocumentUploadRequest.yaml | |
| CERTIFICATE_OF_INCORPORATION: ./NonIdentityDocumentUploadRequest.yaml | |
| ARTICLES_OF_INCORPORATION: ./NonIdentityDocumentUploadRequest.yaml | |
| ARTICLES_OF_ASSOCIATION: ./NonIdentityDocumentUploadRequest.yaml | |
| STATE_REGISTRY_EXCERPT: ./NonIdentityDocumentUploadRequest.yaml | |
| GOOD_STANDING_CERTIFICATE: ./NonIdentityDocumentUploadRequest.yaml | |
| INFORMATION_STATEMENT: ./NonIdentityDocumentUploadRequest.yaml | |
| INCUMBENCY_CERTIFICATE: ./NonIdentityDocumentUploadRequest.yaml | |
| BUSINESS_LICENSE: ./NonIdentityDocumentUploadRequest.yaml | |
| SHAREHOLDER_REGISTER: ./NonIdentityDocumentUploadRequest.yaml | |
| POWER_OF_ATTORNEY: ./NonIdentityDocumentUploadRequest.yaml | |
| UTILITY_BILL: ./NonIdentityDocumentUploadRequest.yaml | |
| ELECTRICITY_BILL: ./NonIdentityDocumentUploadRequest.yaml | |
| RENT_OR_LEASE_AGREEMENT: ./NonIdentityDocumentUploadRequest.yaml | |
| DIRECTOR_REGISTRY: ./NonIdentityDocumentUploadRequest.yaml | |
| TRUST_AGREEMENT: ./NonIdentityDocumentUploadRequest.yaml | |
| STATE_COMPANY_REGISTRY: ./NonIdentityDocumentUploadRequest.yaml | |
| PARTNERSHIP_CONTROL_AGREEMENT: ./NonIdentityDocumentUploadRequest.yaml | |
| PARTNERSHIP_AGREEMENT: ./NonIdentityDocumentUploadRequest.yaml | |
| SELFIE: ./NonIdentityDocumentUploadRequest.yaml | |
| OTHER: ./NonIdentityDocumentUploadRequest.yaml | |
| allOf: | |
| title: Document Upload Request | |
| description: Upload a verification document. | |
| allOf: |
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/documents/DocumentUploadRequest.yaml
Line: 1-2
Comment:
The `description` field was dropped during the revert. The old `DocumentUploadRequest` had `description: Upload a verification document.`. Without it, rendered API docs (Mintlify/Redocly) will show no description for this schema, which hurts discoverability.
```suggestion
title: Document Upload Request
description: Upload a verification document.
allOf:
```
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| title: Document Replace Request | ||
| description: Replace an existing document. | ||
| oneOf: | ||
| - $ref: ./IdentityDocumentReplaceRequest.yaml | ||
| - $ref: ./NonIdentityDocumentReplaceRequest.yaml | ||
| discriminator: | ||
| propertyName: documentType | ||
| mapping: | ||
| PASSPORT: ./IdentityDocumentReplaceRequest.yaml | ||
| DRIVERS_LICENSE: ./IdentityDocumentReplaceRequest.yaml | ||
| NATIONAL_ID: ./IdentityDocumentReplaceRequest.yaml | ||
| PROOF_OF_ADDRESS: ./NonIdentityDocumentReplaceRequest.yaml | ||
| BANK_STATEMENT: ./NonIdentityDocumentReplaceRequest.yaml | ||
| TAX_RETURN: ./NonIdentityDocumentReplaceRequest.yaml | ||
| CERTIFICATE_OF_INCORPORATION: ./NonIdentityDocumentReplaceRequest.yaml | ||
| ARTICLES_OF_INCORPORATION: ./NonIdentityDocumentReplaceRequest.yaml | ||
| ARTICLES_OF_ASSOCIATION: ./NonIdentityDocumentReplaceRequest.yaml | ||
| STATE_REGISTRY_EXCERPT: ./NonIdentityDocumentReplaceRequest.yaml | ||
| GOOD_STANDING_CERTIFICATE: ./NonIdentityDocumentReplaceRequest.yaml | ||
| INFORMATION_STATEMENT: ./NonIdentityDocumentReplaceRequest.yaml | ||
| INCUMBENCY_CERTIFICATE: ./NonIdentityDocumentReplaceRequest.yaml | ||
| BUSINESS_LICENSE: ./NonIdentityDocumentReplaceRequest.yaml | ||
| SHAREHOLDER_REGISTER: ./NonIdentityDocumentReplaceRequest.yaml | ||
| POWER_OF_ATTORNEY: ./NonIdentityDocumentReplaceRequest.yaml | ||
| UTILITY_BILL: ./NonIdentityDocumentReplaceRequest.yaml | ||
| ELECTRICITY_BILL: ./NonIdentityDocumentReplaceRequest.yaml | ||
| RENT_OR_LEASE_AGREEMENT: ./NonIdentityDocumentReplaceRequest.yaml | ||
| DIRECTOR_REGISTRY: ./NonIdentityDocumentReplaceRequest.yaml | ||
| TRUST_AGREEMENT: ./NonIdentityDocumentReplaceRequest.yaml | ||
| STATE_COMPANY_REGISTRY: ./NonIdentityDocumentReplaceRequest.yaml | ||
| PARTNERSHIP_CONTROL_AGREEMENT: ./NonIdentityDocumentReplaceRequest.yaml | ||
| PARTNERSHIP_AGREEMENT: ./NonIdentityDocumentReplaceRequest.yaml | ||
| SELFIE: ./NonIdentityDocumentReplaceRequest.yaml | ||
| OTHER: ./NonIdentityDocumentReplaceRequest.yaml | ||
| allOf: |
There was a problem hiding this comment.
Same as
DocumentUploadRequest — the description field was removed during the revert. Without it, rendered docs will show no description for this schema.
| title: Document Replace Request | |
| description: Replace an existing document. | |
| oneOf: | |
| - $ref: ./IdentityDocumentReplaceRequest.yaml | |
| - $ref: ./NonIdentityDocumentReplaceRequest.yaml | |
| discriminator: | |
| propertyName: documentType | |
| mapping: | |
| PASSPORT: ./IdentityDocumentReplaceRequest.yaml | |
| DRIVERS_LICENSE: ./IdentityDocumentReplaceRequest.yaml | |
| NATIONAL_ID: ./IdentityDocumentReplaceRequest.yaml | |
| PROOF_OF_ADDRESS: ./NonIdentityDocumentReplaceRequest.yaml | |
| BANK_STATEMENT: ./NonIdentityDocumentReplaceRequest.yaml | |
| TAX_RETURN: ./NonIdentityDocumentReplaceRequest.yaml | |
| CERTIFICATE_OF_INCORPORATION: ./NonIdentityDocumentReplaceRequest.yaml | |
| ARTICLES_OF_INCORPORATION: ./NonIdentityDocumentReplaceRequest.yaml | |
| ARTICLES_OF_ASSOCIATION: ./NonIdentityDocumentReplaceRequest.yaml | |
| STATE_REGISTRY_EXCERPT: ./NonIdentityDocumentReplaceRequest.yaml | |
| GOOD_STANDING_CERTIFICATE: ./NonIdentityDocumentReplaceRequest.yaml | |
| INFORMATION_STATEMENT: ./NonIdentityDocumentReplaceRequest.yaml | |
| INCUMBENCY_CERTIFICATE: ./NonIdentityDocumentReplaceRequest.yaml | |
| BUSINESS_LICENSE: ./NonIdentityDocumentReplaceRequest.yaml | |
| SHAREHOLDER_REGISTER: ./NonIdentityDocumentReplaceRequest.yaml | |
| POWER_OF_ATTORNEY: ./NonIdentityDocumentReplaceRequest.yaml | |
| UTILITY_BILL: ./NonIdentityDocumentReplaceRequest.yaml | |
| ELECTRICITY_BILL: ./NonIdentityDocumentReplaceRequest.yaml | |
| RENT_OR_LEASE_AGREEMENT: ./NonIdentityDocumentReplaceRequest.yaml | |
| DIRECTOR_REGISTRY: ./NonIdentityDocumentReplaceRequest.yaml | |
| TRUST_AGREEMENT: ./NonIdentityDocumentReplaceRequest.yaml | |
| STATE_COMPANY_REGISTRY: ./NonIdentityDocumentReplaceRequest.yaml | |
| PARTNERSHIP_CONTROL_AGREEMENT: ./NonIdentityDocumentReplaceRequest.yaml | |
| PARTNERSHIP_AGREEMENT: ./NonIdentityDocumentReplaceRequest.yaml | |
| SELFIE: ./NonIdentityDocumentReplaceRequest.yaml | |
| OTHER: ./NonIdentityDocumentReplaceRequest.yaml | |
| allOf: | |
| title: Document Replace Request | |
| description: Replace an existing document. | |
| allOf: |
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/documents/DocumentReplaceRequest.yaml
Line: 1-2
Comment:
Same as `DocumentUploadRequest` — the `description` field was removed during the revert. Without it, rendered docs will show no description for this schema.
```suggestion
title: Document Replace Request
description: Replace an existing document.
allOf:
```
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
POST /documentsandPUT /documents/{id}request bodies intoIdentityDocumentUploadRequest/NonIdentityDocumentUploadRequest(and the matching replace variants) viaoneOf+ discriminator.DocumentUploadRequest/DocumentReplaceRequestschemas withdocumentNumberandissuingAuthorityoptional, and puts the shared fields back onBaseDocumentRequest.IdentityDocumentType/NonIdentityDocumentTypeenums and the four split request schemas.Test plan
make buildsucceeds;openapi.yamlandmintlify/openapi.yamlre-bundled and clean (no diff after rebuild).🤖 Generated with Claude Code