Skip to content

fix: extracting counterparty information to fix webhook generation#190

Open
pengying wants to merge 1 commit intomainfrom
02-12-fix_extracting_counterparty_information_to_fix_webhook_generation
Open

fix: extracting counterparty information to fix webhook generation#190
pengying wants to merge 1 commit intomainfrom
02-12-fix_extracting_counterparty_information_to_fix_webhook_generation

Conversation

@pengying
Copy link
Contributor

@pengying pengying commented Feb 12, 2026

TL;DR

Extracted CounterpartyInformation into a separate reusable schema component.

What changed?

  • Created a new schema component CounterpartyInformation that was previously defined inline
  • Updated references in the Transaction schema to use the new component via $ref
  • Applied these changes consistently across both the main OpenAPI file and the modular component files

How to test?

  1. Validate that the OpenAPI spec still compiles correctly
  2. Verify that API documentation renders the CounterpartyInformation schema properly
  3. Confirm that any endpoints using transactions with counterparty information still function as expected

Why make this change?

This refactoring improves the OpenAPI specification by:

  • Promoting reusability of the CounterpartyInformation schema
  • Making the schema more maintainable by defining it in a single location
  • Following best practices for OpenAPI schema organization
  • Ensuring consistency if this schema needs to be referenced from other components in the future

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link

github-actions bot commented Feb 12, 2026

✱ Stainless preview builds

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

kotlin

chore(internal): regenerate SDK with no functional changes

openapi

chore(internal): regenerate SDK with no functional changes

python
⏳ (generating...)

fix: extracting counterparty information to fix webhook generation

typescript

chore(internal): regenerate SDK with no functional changes

Edit this comment to update them. They will appear in their respective SDK's changelogs.

grid-typescript studio · code · diff

Your SDK built successfully.
generate ✅build ✅lint ✅test ✅

npm install https://pkg.stainless.com/s/grid-typescript/b12b7b8ca066ef9e1311080d1c643f0d153afcc5/dist.tar.gz
grid-openapi studio · code · diff

Your SDK built successfully.
generate ✅

grid-kotlin studio · code · diff

Your SDK built successfully.
generate ✅build ✅lint ✅test ✅

grid-python studio

Code was not generated because there was a fatal error.


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-02-12 22:17:53 UTC

@pengying pengying marked this pull request as ready for review February 12, 2026 22:29
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 12, 2026

Greptile Overview

Greptile Summary

Successfully extracted CounterpartyInformation from the Transaction schema into a reusable component. This refactoring improves schema organization and maintainability by:

  • Creating a dedicated CounterpartyInformation.yaml schema component in the transactions directory
  • Updating the Transaction schema to reference the component using $ref
  • Properly bundling the changes into both openapi.yaml and mintlify/openapi.yaml

The schema structure remains semantically identical — only the organization changed. All references resolve correctly in the bundled output.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • This is a pure refactoring that extracts an inline schema definition into a reusable component without changing any behavior. The schema content is identical before and after, only the organization differs. The bundled outputs correctly include the new component and all references resolve properly.
  • No files require special attention

Important Files Changed

Filename Overview
openapi/components/schemas/transactions/CounterpartyInformation.yaml New schema component created with proper structure for counterparty information
openapi/components/schemas/transactions/Transaction.yaml Updated to reference CounterpartyInformation via $ref instead of inline definition
openapi.yaml Bundled schema correctly includes CounterpartyInformation component and references
mintlify/openapi.yaml Bundled schema for Mintlify docs correctly includes CounterpartyInformation component

Sequence Diagram

sequenceDiagram
    participant Build as Build Process
    participant Source as openapi/components/schemas/
    participant Transaction as Transaction.yaml
    participant Counter as CounterpartyInformation.yaml
    participant Bundle as openapi.yaml

    Note over Source,Counter: Before: Inline Definition
    Transaction->>Transaction: counterpartyInformation<br/>(inline object)
    
    Note over Source,Counter: After: Extracted Component
    Build->>Transaction: Read Transaction schema
    Transaction->>Counter: $ref: ./CounterpartyInformation.yaml
    Build->>Counter: Read CounterpartyInformation schema
    Build->>Bundle: Bundle schemas with references
    Bundle->>Bundle: Resolve $ref to<br/>#/components/schemas/CounterpartyInformation
Loading

Last reviewed commit: a3a5645

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