sendgrid-python
sendgrid-python copied to clipboard
feat: Multiple Webhook Support
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.
- [ ] Read only docs repo updated to support mock server for new functionality (github.com/sendgrid/sendgrid-oai)
Checklist
- [x] I acknowledge that all my contributions will be made under the project's license
- [x] I have made a material change to the repo (functionality, testing, spelling, grammar)
- [x] I have read the Contribution Guidelines and my PR follows them
- [x] I have titled the PR appropriately
- [x] I have updated my branch with the main branch
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] I have added the necessary documentation about the functionality in the appropriate .md file
- [x] I have added inline documentation to the code I modified
If you have questions, please file a support ticket.
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