-
Notifications
You must be signed in to change notification settings - Fork 41
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
Create a JSON Schema for webhook events #136
Comments
Sounds like a great plan! Thanks Egor for taking this on! For future reference, we might consider changing the format of the published assets to follow the OpenAPI 3.1 specification for webhooks. See the |
Another way to improve the initial JSON Schemas would be to not only parse the examples but also the "Webhook payload object" tables from the docs, e.g. https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#webhook-payload-object |
Events and Webhooks team has discussed publishing a schema, but we do not have a committed roadmap date. Thanks for raising this. @bswinnerton |
Hey @heuels, just checking in, are you still working on this? No rush, just want to free up the issue for others to work on in case you can't yourself |
Hey! Sorry for the lack of updates for a while. I'm still working on this, although rather slowly. I hope to open a PR in a couple of weeks. |
Great, thanks for the update. Let us know if you run into any questions or blockers |
Thanks Egor, that's great! I'll have a look on Monday |
🎉 This issue has been resolved in version 3.27.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Following the discussion in octokit/webhooks.js#171 the plan is to manually create a JSON Schema of webhook events.
As a first step I will bootstrap the schema by feeding the examples through some generator tool (I have my eyes on https://jsonschema.net/ now, but I haven't tried it yet). The second step would take manually correcting the definitions and converting them to enums as needed.
And finally, it would be nice to use the freshly-available schema to generate TypeScript definitions in octokit/webhooks.js using bcherny/json-schema-to-typescript.
The text was updated successfully, but these errors were encountered: