adyen-openapi icon indicating copy to clipboard operation
adyen-openapi copied to clipboard

Notification examples do not adhere to defined schema

Open LucasRxTx opened this issue 4 years ago • 2 comments
trafficstars

Describe the bug There are several notification examples that do not adhere to their defined schema.

For example: REPORT_AVAILABLE example notification does not comply with the declared schema for a ReportAvailableNotificationRequestItem. paymentMethod is stated to be required but the example is missing it. It is unclear what schema I should expect the NotificationRequestItem to be.

There are other errors in the schema definitions, for example for success values, though i have reported it as a separate issue: https://github.com/Adyen/adyen-openapi/issues/26

To Reproduce Look at the openAPI specification for a ReportAvailableNotificationRequestItem and see that paymentMethod is required. Look at the openAPI specification example response for REPORT_AVAILABLE and see the paymentMethod is not included in the example.

Expected behavior Both the actual notification, and the example notification should adhere to the declared schema for REPORT_AVAILABLE.

Screenshots None

Desktop (please complete the following information): irrelevant

Smartphone (please complete the following information): irrelevant

Additional context Using your example responses to create a mock server causes errors in our test system. We are now unsure of the actual expected schema for notifications.

LucasRxTx avatar Aug 17 '21 08:08 LucasRxTx

This seems to be the case in other notifications as well

for example:

  • https://github.com/Adyen/adyen-openapi/blob/4d59745bf59feb74083f5048bad9218801d69ede/yaml/Webhooks-v1.yaml#L1574
  • https://github.com/Adyen/adyen-openapi/blob/4d59745bf59feb74083f5048bad9218801d69ede/yaml/Webhooks-v1.yaml#L1613
  • https://github.com/Adyen/adyen-openapi/blob/4d59745bf59feb74083f5048bad9218801d69ede/yaml/Webhooks-v1.yaml#L1858
  • https://github.com/Adyen/adyen-openapi/blob/4d59745bf59feb74083f5048bad9218801d69ede/yaml/Webhooks-v1.yaml#L1879
  • https://github.com/Adyen/adyen-openapi/blob/4d59745bf59feb74083f5048bad9218801d69ede/yaml/Webhooks-v1.yaml#L1895

LucasRxTx avatar Aug 17 '21 09:08 LucasRxTx

Also encountering this. Plus, the boolean fields in the schema are listed as type: boolean but they are encoded as strings over the enum "true", "false".

PPKFS avatar Oct 20 '22 14:10 PPKFS