Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Multiple Webhook Support #1067

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

sethgrid
Copy link
Contributor

@sethgrid sethgrid commented Apr 18, 2023

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

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please file a support ticket.

sethgrid added 5 commits April 18, 2023 08:48
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.
@kridai
Copy link

kridai commented Apr 25, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants