Skip to content

Commit afa4387

Browse files
pengyingAaryamanBhute
authored andcommitted
fix: extracting counterparty information to fix webhook generation (#190)
### 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
1 parent 163d78f commit afa4387

4 files changed

Lines changed: 26 additions & 21 deletions

File tree

mintlify/openapi.yaml

Lines changed: 9 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi.yaml

Lines changed: 9 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
type: object
2+
description: Additional information about the counterparty, if available and relevant to the transaction and platform. Only applicable for transactions to/from UMA addresses.
3+
additionalProperties: true
4+
example:
5+
FULL_NAME: John Sender
6+
BIRTH_DATE: '1985-06-15'
7+
NATIONALITY: DE

openapi/components/schemas/transactions/Transaction.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,7 @@ properties:
4747
description: Optional memo or description for the payment
4848
example: 'Payment for invoice #1234'
4949
counterpartyInformation:
50-
type: object
51-
description: Additional information about the counterparty, if available and relevant to the transaction and platform. Only applicable for transactions to/from UMA addresses.
52-
additionalProperties: true
53-
example:
54-
FULL_NAME: John Sender
55-
BIRTH_DATE: '1985-06-15'
56-
NATIONALITY: DE
50+
$ref: ./CounterpartyInformation.yaml
5751
discriminator:
5852
propertyName: type
5953
mapping:

0 commit comments

Comments
 (0)