use BeneficialOwner.yaml within business customer#296
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✱ Stainless preview buildsThis PR will update the kotlin openapi python typescript
|
Greptile SummaryThis PR replaces the legacy
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/customers/BeneficialOwner.yaml | Adds ownershipPercentage to the required array — a potentially breaking change for beneficial owners with non-ownership roles (e.g. DIRECTOR). |
| openapi/components/schemas/customers/BusinessCustomer.yaml | Replaces the UltimateBeneficialOwner reference with the richer BeneficialOwner schema for the beneficialOwners array — clean, intentional change. |
| openapi/components/schemas/customers/UltimateBeneficialOwner.yaml | Deleted — superseded by the BeneficialOwner schema, which is more complete and consistent with the rest of the API. |
| openapi.yaml | Regenerated bundle: moves BeneficialOwner-family schemas earlier in the file (near BusinessCustomer) and removes the duplicate definitions that previously lived at the bottom. |
| mintlify/openapi.yaml | Mirror of openapi.yaml bundle regeneration — no independent changes. |
Class Diagram
%%{init: {'theme': 'neutral'}}%%
classDiagram
class BusinessCustomer {
+Customer base
+BusinessCustomerFields fields
+BusinessInfo businessInfo
+BeneficialOwner[] beneficialOwners
}
class BeneficialOwner {
+string id
+string customerId
+BeneficialOwnerRole[] roles
+integer ownershipPercentage
+BeneficialOwnerPersonalInfo personalInfo
+KycStatus kycStatus
+datetime createdAt
+datetime updatedAt
}
class BeneficialOwnerPersonalInfo {
+string firstName
+string middleName
+string lastName
+date birthDate
+string nationality
+string email
+string phoneNumber
+Address address
+IdentificationType idType
+string identifier
+string countryOfIssuance
}
class UltimateBeneficialOwner {
<<deleted>>
+string fullName
+string emailAddress
+string phoneNumber
+string taxId
+date birthDate
+string nationality
+Address address
+string individualType
+number percentageOwnership
+string title
}
BusinessCustomer --> BeneficialOwner : beneficialOwners
BeneficialOwner --> BeneficialOwnerPersonalInfo : personalInfo
BusinessCustomer ..> UltimateBeneficialOwner : was
Prompt To Fix All With AI
This is a comment left during a code review.
Path: openapi/components/schemas/customers/BeneficialOwner.yaml
Line: 4
Comment:
**`ownershipPercentage` required for all roles**
Making `ownershipPercentage` required means every `BeneficialOwner` the server returns must include it — including those whose `roles` are purely non-ownership roles like `DIRECTOR`, `COMPANY_OFFICER`, or `CONTROL_PERSON`. A director with no equity stake would need to carry `ownershipPercentage: 0`, which is semantically different from the field simply being absent.
If the server always supplies this value, this is fine. But if some beneficial owners are created/returned without an ownership percentage, removing it from `required` (or keeping it optional with a note that it defaults to `0`) would more accurately reflect the data model.
```suggestion
- ownershipPercentage
```
Consider removing `ownershipPercentage` from `required` if it may be absent for non-UBO roles, and instead document it as optional with a range of 0–100.
How can I resolve this? If you propose a fix, please make it concise.Reviews (2): Last reviewed commit: "use BeneficialOwner.yaml within business..." | Re-trigger Greptile
6d092a0 to
5cba88b
Compare
| @@ -3,6 +3,7 @@ required: | |||
| - id | |||
| - customerId | |||
There was a problem hiding this comment.
ownershipPercentage required for all roles
Making ownershipPercentage required means every BeneficialOwner the server returns must include it — including those whose roles are purely non-ownership roles like DIRECTOR, COMPANY_OFFICER, or CONTROL_PERSON. A director with no equity stake would need to carry ownershipPercentage: 0, which is semantically different from the field simply being absent.
If the server always supplies this value, this is fine. But if some beneficial owners are created/returned without an ownership percentage, removing it from required (or keeping it optional with a note that it defaults to 0) would more accurately reflect the data model.
| - customerId | |
| - ownershipPercentage |
Consider removing ownershipPercentage from required if it may be absent for non-UBO roles, and instead document it as optional with a range of 0–100.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/customers/BeneficialOwner.yaml
Line: 4
Comment:
**`ownershipPercentage` required for all roles**
Making `ownershipPercentage` required means every `BeneficialOwner` the server returns must include it — including those whose `roles` are purely non-ownership roles like `DIRECTOR`, `COMPANY_OFFICER`, or `CONTROL_PERSON`. A director with no equity stake would need to carry `ownershipPercentage: 0`, which is semantically different from the field simply being absent.
If the server always supplies this value, this is fine. But if some beneficial owners are created/returned without an ownership percentage, removing it from `required` (or keeping it optional with a note that it defaults to `0`) would more accurately reflect the data model.
```suggestion
- ownershipPercentage
```
Consider removing `ownershipPercentage` from `required` if it may be absent for non-UBO roles, and instead document it as optional with a range of 0–100.
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!

No description provided.