sendgrid / sendgrid-python

The Official Twilio SendGrid Python API Library
https://sendgrid.com
MIT License
1.53k stars 712 forks source link

feat: Multiple Webhook Support #1067

Open sethgrid opened 1 year ago

sethgrid commented 1 year ago

SendGrid now allows for multiple webhooks and this PR pulls in the non-breaking API changes to support it.

Webhook resources will now take an ID parameter to target specific webhooks. When a webhook resource is NOT used with an ID, the API falls back to legacy behavior assuming there is only one webhook, and this defaults to the oldest webhook available. Users should update their services to reference webhooks by ID.

Checklist

If you have questions, please file a support ticket.

kridai commented 1 year ago

Hi @sethgrid , regarding the failing test. We are using stoplight/prism to create a mock server for integration tests. These are the test where the changes were made and are failing. Prism uses oai_stoplight.json to mock the api. These configurations are imported here. This needs to be updated to adhere to the recent webhook changes. Also this needs to be updated to fetch the latest changes in oai_stoplight.json instead of from a particular commit. After the changes are done in sendgrid-oai. We can test this locally in sendgrid/python by running make test-docker command