Expose transaction receipt fields#507
Conversation
|
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 Edit this comment to update them. They will appear in their respective SDK's changelogs. ✅ grid-openapi studio · code · diff
✅ grid-ruby studio · code · diff
✅ grid-go studio · code · diff
|
Greptile SummaryThis PR extends the
Confidence Score: 3/5Safe to merge once the empty-object gap in ReconciliationInstructions is addressed; the fees addition is clean. Making openapi/components/schemas/common/ReconciliationInstructions.yaml — the optionality change and stale description both need attention before merging.
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/common/ReconciliationInstructions.yaml | Makes reference optional and adds transactionHash; stale "must be included" description and no constraint preventing a fully-empty object. |
| openapi/components/schemas/transactions/IncomingTransaction.yaml | Adds optional fees field (int64, minimum 0) to incoming transactions; straightforward and well-formed. |
| openapi.yaml | Generated bundle reflecting the source schema changes; no issues beyond those already flagged in the source files. |
| mintlify/openapi.yaml | Mintlify-targeted generated bundle; identical changes to openapi.yaml, no independent issues. |
Sequence Diagram
sequenceDiagram
participant Client
participant GridAPI
Client->>GridAPI: "GET /transactions/{id}"
GridAPI-->>Client: IncomingTransaction response
note over Client,GridAPI: New optional fields in response
note right of GridAPI: fees (int64, min 0)<br/>reconciliationInstructions.transactionHash
note right of GridAPI: reconciliationInstructions.reference<br/>is now optional (was required)
Client->>Client: Handle reconciliationInstructions
alt reference present
Client->>Client: Use reference for payment matching
else transactionHash present
Client->>Client: Use transactionHash for crypto receipt
else neither present (now schema-valid)
Client->>Client: Empty object — no matching data
end
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
openapi/components/schemas/common/ReconciliationInstructions.yaml:3-8
**Stale "must be included" wording after making `reference` optional**
The `reference` field description still reads "must be included with the payment", but the `required` constraint was just removed. Any API consumer reading this description will think the field is mandatory when the schema now treats it as optional — the two are in direct conflict.
### Issue 2 of 2
openapi/components/schemas/common/ReconciliationInstructions.yaml:1-13
**Schema now accepts a fully-empty `ReconciliationInstructions` object**
With both `reference` and `transactionHash` optional, the object `{}` is valid per the schema. The PR description states the intent is to allow a transaction hash *when no payment reference exists*, implying at least one field should always be present. A `minProperties: 1` constraint (or an `anyOf` / `oneOf` requiring at least one of the two fields) would close the gap and prevent a semantically meaningless empty object from passing validation.
Reviews (1): Last reviewed commit: "feat(transactions): expose receipt recon..." | Re-trigger Greptile
| reference: | ||
| type: string | ||
| description: >- | ||
| Unique reference code that must be included with the payment to match it | ||
| with the correct incoming transaction | ||
| example: UMA-Q12345-REF |
There was a problem hiding this comment.
Stale "must be included" wording after making
reference optional
The reference field description still reads "must be included with the payment", but the required constraint was just removed. Any API consumer reading this description will think the field is mandatory when the schema now treats it as optional — the two are in direct conflict.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/ReconciliationInstructions.yaml
Line: 3-8
Comment:
**Stale "must be included" wording after making `reference` optional**
The `reference` field description still reads "must be included with the payment", but the `required` constraint was just removed. Any API consumer reading this description will think the field is mandatory when the schema now treats it as optional — the two are in direct conflict.
How can I resolve this? If you propose a fix, please make it concise.| type: object | ||
| required: | ||
| - reference | ||
| properties: | ||
| reference: | ||
| type: string | ||
| description: >- | ||
| Unique reference code that must be included with the payment to match it | ||
| with the correct incoming transaction | ||
| example: UMA-Q12345-REF | ||
| transactionHash: | ||
| type: string | ||
| description: >- | ||
| Transaction hash for the underlying crypto transfer, when available. | ||
| example: "0x9f2c6b6f4b6c8f2a8d9e0b1c2d3e4f5061728394a5b6c7d8e9f00112233445566" |
There was a problem hiding this comment.
Schema now accepts a fully-empty
ReconciliationInstructions object
With both reference and transactionHash optional, the object {} is valid per the schema. The PR description states the intent is to allow a transaction hash when no payment reference exists, implying at least one field should always be present. A minProperties: 1 constraint (or an anyOf / oneOf requiring at least one of the two fields) would close the gap and prevent a semantically meaningless empty object from passing validation.
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/ReconciliationInstructions.yaml
Line: 1-13
Comment:
**Schema now accepts a fully-empty `ReconciliationInstructions` object**
With both `reference` and `transactionHash` optional, the object `{}` is valid per the schema. The PR description states the intent is to allow a transaction hash *when no payment reference exists*, implying at least one field should always be present. A `minProperties: 1` constraint (or an `anyOf` / `oneOf` requiring at least one of the two fields) would close the gap and prevent a semantically meaningless empty object from passing validation.
How can I resolve this? If you propose a fix, please make it concise.540a94a to
d50e79d
Compare
Summary
transactionHashtoreconciliationInstructionsfor destination-side crypto settlement receipt data.referenceoptional so reconciliation instructions can contain only a transaction hash when no payment reference exists.feesto incoming transactions, denominated in the receiving currency's smallest unit.openapi.yamlandmintlify/openapi.yaml.Testing
make buildmake lint