Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions mintlify/openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions openapi/components/schemas/customers/InternalAccount.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
type: object
required:
- id
- status
- balance
- fundingPaymentInstructions
- createdAt
Expand All @@ -10,6 +11,8 @@ properties:
type: string
description: The ID of the internal account
example: InternalAccount:12dcbd6-dced-4ec4-b756-3c3a9ea3d123
status:
$ref: ./InternalAccountStatus.yaml
customerId:
Comment on lines 1 to 16
Copy link
Contributor

Choose a reason for hiding this comment

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

Required field on existing response schema

status is being introduced directly as a required field on the InternalAccount response object. This is a potentially breaking change for existing API consumers: any auto-generated client SDKs built from the old schema will now have a non-optional status field, and any client doing strict schema validation against the old spec will fail when they receive the new field.

More critically, if there are already existing InternalAccount records in the database that were created before a corresponding backend migration populates status, the server would either have to synthesize a default value or return a response that violates its own contract.

The safer approach is to introduce the field as optional first (omit it from required), deploy the schema + backend together once all existing records are backfilled, and then promote it to required in a follow-up PR:

Suggested change
type: object
required:
- id
- balance
- fundingPaymentInstructions
- createdAt
- updatedAt
properties:
id:
type: string
description: The ID of the internal account
example: InternalAccount:12dcbd6-dced-4ec4-b756-3c3a9ea3d123
status:
$ref: ./InternalAccountStatus.yaml
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/customers/InternalAccount.yaml
Line: 1-16

Comment:
**Required field on existing response schema**

`status` is being introduced directly as a `required` field on the `InternalAccount` response object. This is a potentially breaking change for existing API consumers: any auto-generated client SDKs built from the old schema will now have a non-optional `status` field, and any client doing strict schema validation against the old spec will fail when they receive the new field.

More critically, if there are already existing `InternalAccount` records in the database that were created before a corresponding backend migration populates `status`, the server would either have to synthesize a default value or return a response that violates its own contract.

The safer approach is to introduce the field as optional first (omit it from `required`), deploy the schema + backend together once all existing records are backfilled, and then promote it to `required` in a follow-up PR:

```suggestion
type: object
required:
  - id
  - balance
  - fundingPaymentInstructions
  - createdAt
  - updatedAt
properties:
  id:
    type: string
    description: The ID of the internal account
    example: InternalAccount:12dcbd6-dced-4ec4-b756-3c3a9ea3d123
  status:
    $ref: ./InternalAccountStatus.yaml
```

How can I resolve this? If you propose a fix, please make it concise.

type: string
description: The ID of the customer associated with the internal account. If this field is empty, the internal account belongs to the platform.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type: string
enum:
- PENDING
- OPEN
- CLOSED
- FROZEN
description: Status of an internal account