Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✱ Stainless preview buildsThis PR will update the kotlin openapi python typescript ✅ grid-python studio · code
✅ grid-typescript studio · code
✅ grid-kotlin studio · code
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
Greptile SummaryThis PR adds Confidence Score: 5/5Safe to merge; only one minor P2 schema improvement suggested All findings are P2 style/best-practice suggestions. The endpoints are well-structured with correct operationIds, proper security definitions, and consistent response codes across both customer and platform paths. openapi/components/schemas/external_accounts/ExternalAccountUpdateRequest.yaml — consider adding minProperties: 1
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/external_accounts/ExternalAccountUpdateRequest.yaml | New schema for PATCH request body; both properties are optional with no minProperties guard, allowing an empty body to pass validation |
| openapi/paths/customers/customers_external_accounts_{externalAccountId}.yaml | New path file adding GET/PATCH/DELETE for customer external accounts; correct operationIds, auth, and response codes |
| openapi/paths/platform/platform_external_accounts_{externalAccountId}.yaml | New path file adding GET/PATCH/DELETE for platform external accounts; mirrors customer path correctly with distinct operationIds |
| openapi/openapi.yaml | Root spec updated to register both new {externalAccountId} path refs |
| openapi.yaml | Generated bundle regenerated via make build; changes are mechanical and consistent with source |
| mintlify/openapi.yaml | Mintlify-specific generated bundle regenerated via make build; new endpoints correctly reflected |
Sequence Diagram
sequenceDiagram
participant Client
participant API as Grid API
Client->>API: GET /customers/external-accounts/{id}
API-->>Client: 200 ExternalAccount | 401 | 404 | 500
Client->>API: PATCH /customers/external-accounts/{id}
Note over Client,API: Body: ExternalAccountUpdateRequest
API-->>Client: 200 ExternalAccount | 400 | 401 | 404 | 500
Client->>API: DELETE /customers/external-accounts/{id}
API-->>Client: 204 No Content | 401 | 404 | 500
Client->>API: GET /platform/external-accounts/{id}
API-->>Client: 200 ExternalAccount | 401 | 404 | 500
Client->>API: PATCH /platform/external-accounts/{id}
Note over Client,API: Body: ExternalAccountUpdateRequest
API-->>Client: 200 ExternalAccount | 400 | 401 | 404 | 500
Client->>API: DELETE /platform/external-accounts/{id}
API-->>Client: 204 No Content | 401 | 404 | 500
Prompt To Fix All With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountUpdateRequest.yaml
Line: 1-10
Comment:
**Empty PATCH body passes schema validation**
`ExternalAccountUpdateRequest` has both properties optional and no `minProperties` constraint, so a client sending `{}` would satisfy the schema and receive a `200` with no changes applied. Consider adding `minProperties: 1` to make the no-op case a schema error (`400`), consistent with typical PATCH semantics.
```suggestion
type: object
description: Request body for updating an external account. Only a limited set of fields are mutable.
minProperties: 1
properties:
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "feat(openapi): add GET/PATCH/DELETE for ..." | Re-trigger Greptile
| type: object | ||
| description: Request body for updating an external account. Only a limited set of fields are mutable. | ||
| properties: | ||
| platformAccountId: | ||
| type: string | ||
| description: Optional platform-specific identifier for this account | ||
| example: acc_123456789 | ||
| beneficiary: | ||
| $ref: ./BeneficiaryOneOf.yaml | ||
| description: Updated beneficiary information for the external account |
There was a problem hiding this comment.
Empty PATCH body passes schema validation
ExternalAccountUpdateRequest has both properties optional and no minProperties constraint, so a client sending {} would satisfy the schema and receive a 200 with no changes applied. Consider adding minProperties: 1 to make the no-op case a schema error (400), consistent with typical PATCH semantics.
| type: object | |
| description: Request body for updating an external account. Only a limited set of fields are mutable. | |
| properties: | |
| platformAccountId: | |
| type: string | |
| description: Optional platform-specific identifier for this account | |
| example: acc_123456789 | |
| beneficiary: | |
| $ref: ./BeneficiaryOneOf.yaml | |
| description: Updated beneficiary information for the external account | |
| type: object | |
| description: Request body for updating an external account. Only a limited set of fields are mutable. | |
| minProperties: 1 | |
| properties: |
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountUpdateRequest.yaml
Line: 1-10
Comment:
**Empty PATCH body passes schema validation**
`ExternalAccountUpdateRequest` has both properties optional and no `minProperties` constraint, so a client sending `{}` would satisfy the schema and receive a `200` with no changes applied. Consider adding `minProperties: 1` to make the no-op case a schema error (`400`), consistent with typical PATCH semantics.
```suggestion
type: object
description: Request body for updating an external account. Only a limited set of fields are mutable.
minProperties: 1
properties:
```
How can I resolve this? If you propose a fix, please make it concise.
No description provided.