From fce86833ba6dfc9d7da1f40b930d4dd0b195921f Mon Sep 17 00:00:00 2001 From: Peng Ying Date: Sat, 24 Jan 2026 14:35:04 -0800 Subject: [PATCH] feat: rename Error to GridError and add additionalProperties to error schemas --- mintlify/openapi.yaml | 51 ++++++++++++++----- openapi.yaml | 51 ++++++++++++++----- .../components/schemas/common/GridError.yaml | 13 +++++ .../BulkCustomerImportErrorEntry.yaml | 11 ++++ .../customers/BulkCustomerImportJob.yaml | 12 +---- .../components/schemas/errors/Error400.yaml | 1 + .../components/schemas/errors/Error401.yaml | 1 + .../components/schemas/errors/Error403.yaml | 1 + .../components/schemas/errors/Error404.yaml | 1 + .../components/schemas/errors/Error409.yaml | 1 + .../components/schemas/errors/Error410.yaml | 26 ++++++++++ .../components/schemas/errors/Error412.yaml | 1 + .../components/schemas/errors/Error424.yaml | 1 + .../components/schemas/errors/Error500.yaml | 1 + .../components/schemas/errors/Error501.yaml | 1 + ...comingPaymentWebhookForbiddenResponse.yaml | 2 +- ...ngPaymentWebhookUnprocessableResponse.yaml | 2 +- 17 files changed, 138 insertions(+), 39 deletions(-) create mode 100644 openapi/components/schemas/common/GridError.yaml create mode 100644 openapi/components/schemas/customers/BulkCustomerImportErrorEntry.yaml create mode 100644 openapi/components/schemas/errors/Error410.yaml diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index c6fecbf..5cd0729 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -3945,6 +3945,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error500: type: object required: @@ -3973,6 +3974,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error400: type: object required: @@ -4051,6 +4053,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error501: type: object required: @@ -4079,6 +4082,7 @@ components: details: type: object description: Additional error details + additionalProperties: true CustomerType: type: string enum: @@ -4398,6 +4402,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error404: type: object required: @@ -4438,6 +4443,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error: type: object properties: @@ -6045,6 +6051,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error424: type: object required: @@ -6077,6 +6084,7 @@ components: details: type: object description: Additional error details + additionalProperties: true AccountQuoteSource: allOf: - $ref: '#/components/schemas/BaseQuoteSource' @@ -6412,6 +6420,32 @@ components: response_body: type: string description: The raw body content returned by the webhook endpoint in response to the request + GridError: + type: object + title: GridError + properties: + code: + type: string + description: Error code + message: + type: string + description: Error message + details: + type: object + description: Additional error details + additionalProperties: true + BulkCustomerImportErrorEntry: + allOf: + - $ref: '#/components/schemas/GridError' + - type: object + description: Error information for a failed bulk import entry + required: + - correlationId + properties: + correlationId: + type: string + description: Platform customer ID or row number for the failed entry + example: biz456 BulkCustomerImportJob: type: object required: @@ -6460,17 +6494,7 @@ components: type: array description: Detailed error information for failed entries items: - type: object - required: - - correlationId - - error - properties: - correlationId: - type: string - description: Platform customer ID or row number for the failed entry - example: biz456 - error: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/BulkCustomerImportErrorEntry' completedAt: type: string format: date-time @@ -6566,6 +6590,7 @@ components: details: type: object description: Additional error details + additionalProperties: true UmaProvider: type: object properties: @@ -6785,7 +6810,7 @@ components: description: Information about the recipient, provided by the platform if requested in the webhook via `requestedReceiverCustomerInfoFields` and the payment is approved. IncomingPaymentWebhookForbiddenResponse: allOf: - - $ref: '#/components/schemas/Error' + - $ref: '#/components/schemas/GridError' - type: object properties: reason: @@ -6794,7 +6819,7 @@ components: example: RESTRICTED_JURISDICTION IncomingPaymentWebhookUnprocessableResponse: allOf: - - $ref: '#/components/schemas/Error' + - $ref: '#/components/schemas/GridError' - type: object properties: requiredFields: diff --git a/openapi.yaml b/openapi.yaml index c6fecbf..5cd0729 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3945,6 +3945,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error500: type: object required: @@ -3973,6 +3974,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error400: type: object required: @@ -4051,6 +4053,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error501: type: object required: @@ -4079,6 +4082,7 @@ components: details: type: object description: Additional error details + additionalProperties: true CustomerType: type: string enum: @@ -4398,6 +4402,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error404: type: object required: @@ -4438,6 +4443,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error: type: object properties: @@ -6045,6 +6051,7 @@ components: details: type: object description: Additional error details + additionalProperties: true Error424: type: object required: @@ -6077,6 +6084,7 @@ components: details: type: object description: Additional error details + additionalProperties: true AccountQuoteSource: allOf: - $ref: '#/components/schemas/BaseQuoteSource' @@ -6412,6 +6420,32 @@ components: response_body: type: string description: The raw body content returned by the webhook endpoint in response to the request + GridError: + type: object + title: GridError + properties: + code: + type: string + description: Error code + message: + type: string + description: Error message + details: + type: object + description: Additional error details + additionalProperties: true + BulkCustomerImportErrorEntry: + allOf: + - $ref: '#/components/schemas/GridError' + - type: object + description: Error information for a failed bulk import entry + required: + - correlationId + properties: + correlationId: + type: string + description: Platform customer ID or row number for the failed entry + example: biz456 BulkCustomerImportJob: type: object required: @@ -6460,17 +6494,7 @@ components: type: array description: Detailed error information for failed entries items: - type: object - required: - - correlationId - - error - properties: - correlationId: - type: string - description: Platform customer ID or row number for the failed entry - example: biz456 - error: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/BulkCustomerImportErrorEntry' completedAt: type: string format: date-time @@ -6566,6 +6590,7 @@ components: details: type: object description: Additional error details + additionalProperties: true UmaProvider: type: object properties: @@ -6785,7 +6810,7 @@ components: description: Information about the recipient, provided by the platform if requested in the webhook via `requestedReceiverCustomerInfoFields` and the payment is approved. IncomingPaymentWebhookForbiddenResponse: allOf: - - $ref: '#/components/schemas/Error' + - $ref: '#/components/schemas/GridError' - type: object properties: reason: @@ -6794,7 +6819,7 @@ components: example: RESTRICTED_JURISDICTION IncomingPaymentWebhookUnprocessableResponse: allOf: - - $ref: '#/components/schemas/Error' + - $ref: '#/components/schemas/GridError' - type: object properties: requiredFields: diff --git a/openapi/components/schemas/common/GridError.yaml b/openapi/components/schemas/common/GridError.yaml new file mode 100644 index 0000000..4f956b6 --- /dev/null +++ b/openapi/components/schemas/common/GridError.yaml @@ -0,0 +1,13 @@ +type: object +title: GridError +properties: + code: + type: string + description: Error code + message: + type: string + description: Error message + details: + type: object + description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/customers/BulkCustomerImportErrorEntry.yaml b/openapi/components/schemas/customers/BulkCustomerImportErrorEntry.yaml new file mode 100644 index 0000000..79bfb0b --- /dev/null +++ b/openapi/components/schemas/customers/BulkCustomerImportErrorEntry.yaml @@ -0,0 +1,11 @@ +allOf: + - $ref: ../common/GridError.yaml + - type: object + description: Error information for a failed bulk import entry + required: + - correlationId + properties: + correlationId: + type: string + description: Platform customer ID or row number for the failed entry + example: biz456 diff --git a/openapi/components/schemas/customers/BulkCustomerImportJob.yaml b/openapi/components/schemas/customers/BulkCustomerImportJob.yaml index a550d9c..1c74dc1 100644 --- a/openapi/components/schemas/customers/BulkCustomerImportJob.yaml +++ b/openapi/components/schemas/customers/BulkCustomerImportJob.yaml @@ -45,17 +45,7 @@ properties: type: array description: Detailed error information for failed entries items: - type: object - required: - - correlationId - - error - properties: - correlationId: - type: string - description: Platform customer ID or row number for the failed entry - example: biz456 - error: - $ref: ../common/Error.yaml + $ref: BulkCustomerImportErrorEntry.yaml completedAt: type: string format: date-time diff --git a/openapi/components/schemas/errors/Error400.yaml b/openapi/components/schemas/errors/Error400.yaml index b0e0587..804857b 100644 --- a/openapi/components/schemas/errors/Error400.yaml +++ b/openapi/components/schemas/errors/Error400.yaml @@ -75,3 +75,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/errors/Error401.yaml b/openapi/components/schemas/errors/Error401.yaml index df6a733..d92fb3b 100644 --- a/openapi/components/schemas/errors/Error401.yaml +++ b/openapi/components/schemas/errors/Error401.yaml @@ -25,3 +25,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/errors/Error403.yaml b/openapi/components/schemas/errors/Error403.yaml index 36c474c..c07ddfb 100644 --- a/openapi/components/schemas/errors/Error403.yaml +++ b/openapi/components/schemas/errors/Error403.yaml @@ -29,3 +29,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/errors/Error404.yaml b/openapi/components/schemas/errors/Error404.yaml index 19e2bfc..d53ff41 100644 --- a/openapi/components/schemas/errors/Error404.yaml +++ b/openapi/components/schemas/errors/Error404.yaml @@ -37,3 +37,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/errors/Error409.yaml b/openapi/components/schemas/errors/Error409.yaml index 0d23fd7..b033a67 100644 --- a/openapi/components/schemas/errors/Error409.yaml +++ b/openapi/components/schemas/errors/Error409.yaml @@ -25,3 +25,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/errors/Error410.yaml b/openapi/components/schemas/errors/Error410.yaml new file mode 100644 index 0000000..57d4fee --- /dev/null +++ b/openapi/components/schemas/errors/Error410.yaml @@ -0,0 +1,26 @@ +type: object +required: + - message + - status + - code +properties: + status: + type: integer + enum: + - 410 + description: HTTP status code + code: + type: string + description: | + | Error Code | Description | + |------------|-------------| + | CUSTOMER_DELETED | Customer has been permanently deleted | + enum: + - CUSTOMER_DELETED + message: + type: string + description: Error message + details: + type: object + description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/errors/Error412.yaml b/openapi/components/schemas/errors/Error412.yaml index 4ac0344..74edf25 100644 --- a/openapi/components/schemas/errors/Error412.yaml +++ b/openapi/components/schemas/errors/Error412.yaml @@ -22,3 +22,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/errors/Error424.yaml b/openapi/components/schemas/errors/Error424.yaml index 5cd0b2b..1a9b5a4 100644 --- a/openapi/components/schemas/errors/Error424.yaml +++ b/openapi/components/schemas/errors/Error424.yaml @@ -29,3 +29,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/errors/Error500.yaml b/openapi/components/schemas/errors/Error500.yaml index 7aea864..50be5ad 100644 --- a/openapi/components/schemas/errors/Error500.yaml +++ b/openapi/components/schemas/errors/Error500.yaml @@ -25,3 +25,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/errors/Error501.yaml b/openapi/components/schemas/errors/Error501.yaml index 55a275f..7a0b797 100644 --- a/openapi/components/schemas/errors/Error501.yaml +++ b/openapi/components/schemas/errors/Error501.yaml @@ -25,3 +25,4 @@ properties: details: type: object description: Additional error details + additionalProperties: true diff --git a/openapi/components/schemas/webhooks/IncomingPaymentWebhookForbiddenResponse.yaml b/openapi/components/schemas/webhooks/IncomingPaymentWebhookForbiddenResponse.yaml index 12c0b08..4d8b6c0 100644 --- a/openapi/components/schemas/webhooks/IncomingPaymentWebhookForbiddenResponse.yaml +++ b/openapi/components/schemas/webhooks/IncomingPaymentWebhookForbiddenResponse.yaml @@ -1,5 +1,5 @@ allOf: - - $ref: ../common/Error.yaml + - $ref: ../common/GridError.yaml - type: object properties: reason: diff --git a/openapi/components/schemas/webhooks/IncomingPaymentWebhookUnprocessableResponse.yaml b/openapi/components/schemas/webhooks/IncomingPaymentWebhookUnprocessableResponse.yaml index 83e0026..543ecce 100644 --- a/openapi/components/schemas/webhooks/IncomingPaymentWebhookUnprocessableResponse.yaml +++ b/openapi/components/schemas/webhooks/IncomingPaymentWebhookUnprocessableResponse.yaml @@ -1,5 +1,5 @@ allOf: - - $ref: ../common/Error.yaml + - $ref: ../common/GridError.yaml - type: object properties: requiredFields: