-
Notifications
You must be signed in to change notification settings - Fork 42
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
[BUG]: Pull request opened event JSON schema doesn't pass validation with AJV #900
Comments
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with |
Can you share the offending payload? There is a new property that is present on the Also, it's best to share the raw AJV error in cases like these. Also, you may like to implement similar code to this: https://github.com/wolfy1339/compare-gh-webhook-to-schema-function/blob/f1ae54d9bd7347b2f0a0199e46ed4dad21ed6695/src/github/EventValidator.ts#L106-L123 That way similar errors are not repeated, and errors that are similar are merged together for a more streamlined output |
@wolfy1339 Thank you for your response. Sorry for providing fastify error output instead of raw AJV. I compared the example payload with the real one and the property thats causing the validation error is |
🎉 This issue has been resolved in version 7.4.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
What happened?
I'm using fastify with AJV with following configuration:
I need to set
removeAdditional: false
in order to pass the validation of example Pull Request Opened payload from this repository. However even with that config the real payload coming from the github does not pass the validation.Versions
Node: v20.11.0
@octokit/webhooks-schemas: v7.3.2
fastify: v4.26.1
ajv: 8.12.0
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: