Skip to content

feat(openapi): add GET/PATCH/DELETE for external accounts by ID#357

Merged
pengying merged 1 commit intomainfrom
04-20-feat_openapi_add_get_patch_delete_for_external_accounts_by_id
Apr 21, 2026
Merged

feat(openapi): add GET/PATCH/DELETE for external accounts by ID#357
pengying merged 1 commit intomainfrom
04-20-feat_openapi_add_get_patch_delete_for_external_accounts_by_id

Conversation

@pengying
Copy link
Copy Markdown
Contributor

No description provided.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 21, 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 Apr 21, 2026 0:24am

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 Apr 21, 2026

✱ Stainless preview builds

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

kotlin

feat(api): add retrieve/update/delete to customers/platform external accounts

openapi

feat(api): add retrieve/update/delete to customers/platform external_accounts and types

python

feat(api): add retrieve/update/delete to customers/platform external_accounts

typescript

feat(api): add retrieve/update/delete to customers/platform externalAccounts
grid-openapi studio · code

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

grid-python studio · code

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

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

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

npm install https://pkg.stainless.com/s/grid-typescript/5f483e034919fc9a7e64cd42df8da5a7c2f19ee3/dist.tar.gz
grid-kotlin studio · code

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


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-04-21 04:25:06 UTC

@pengying pengying marked this pull request as ready for review April 21, 2026 00:28
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 21, 2026

Greptile Summary

This PR adds GET, PATCH, and DELETE endpoints for individual external accounts under both the /customers/external-accounts/{externalAccountId} and /platform/external-accounts/{externalAccountId} paths, along with a new ExternalAccountUpdateRequest schema that limits mutable fields to platformAccountId and beneficiary. The source files in openapi/ are correctly authored and the bundled artifacts (openapi.yaml, mintlify/openapi.yaml) have been regenerated via make build.

Confidence Score: 5/5

Safe 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

Important Files Changed

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
Loading

Fix All in Claude Code

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

Comment on lines +1 to +10
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
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 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.

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

Fix in Claude Code

Copy link
Copy Markdown
Contributor Author

pengying commented Apr 21, 2026

Merge activity

  • Apr 21, 4:18 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 21, 4:18 AM UTC: @pengying merged this pull request with Graphite.

@pengying pengying merged commit b916f15 into main Apr 21, 2026
9 checks passed
@pengying pengying deleted the 04-20-feat_openapi_add_get_patch_delete_for_external_accounts_by_id branch April 21, 2026 04:18
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