Skip to content

Implement Webhooks #1001

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

Merged
merged 1 commit into from
Nov 23, 2022
Merged

Implement Webhooks #1001

merged 1 commit into from
Nov 23, 2022

Conversation

yacinehmito
Copy link
Contributor

@yacinehmito yacinehmito commented Nov 20, 2022

Changes

Implements webhooks. I am usually verbose in my PR descriptions but here the change is quite straightforward. The specs define webhooks as being identical to paths (with the exception that it does not have actual paths), so I just copy-pasted the implementation for paths and removed the bit that relates to pathParamsAsTypes.

Fixes #994.

How to Review

I don't know. There was a lot of changes in the test due to the inclusion of export type webhooks = Record<string, never>;, but the only test that is actually relevant is the "GitHub (next)" snapshot, which is the only one with webhooks (the normal GitHub one has them as well but on a non-standard property, which is x-webhooks).

For the unit test I took inspiration from the paths' one. I hope it is sufficient.

Checklist

  • Unit tests updated
  • README updated
  • examples/ directory updated (if applicable)

I don't think there is anything to add in the README.

@drwpow
Copy link
Contributor

drwpow commented Nov 23, 2022

This looks great to me! Great tests, too. Additions like this are pretty safe (there’s no existing functionality that may break) so I’m happy to merge & ship this. No feedback!

@drwpow drwpow merged commit 9f1127f into openapi-ts:main Nov 23, 2022
@drwpow
Copy link
Contributor

drwpow commented Nov 23, 2022

@all-contributors please add @yacinehmito for code, test

@allcontributors
Copy link
Contributor

@drwpow

I've put up a pull request to add @yacinehmito! 🎉

@yacinehmito
Copy link
Contributor Author

Thank you!

@yacinehmito yacinehmito deleted the pr/webhooks branch November 23, 2022 17:06
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.

Webhooks are not being generated
2 participants