openapi
openapi copied to clipboard
Use the new OpenAPI webhooks and callbacks to describe Stripe webhooks
In OpenAPI 3.0 there is already a "callbacks" parameter describing the webhooks triggered by an API call.
In the new OpenAPI 3.1 there is also a webhooks root description for out of bands webhook events like the one Stripe uses. See https://github.com/OAI/OpenAPI-Specification/releases/tag/3.1.0-rc0
Could you please improve the Stripe Open API definitions to include both webhooks and callbacks descriptions in the Stripe OpenAPI specification?
@gpetrov Thanks for reaching out! This is a great feature request and I do see how helpful this could be. I'm going to tag as "future" for now as this not something that would happen in the near future unfortunately. This logic of which events can be sent by which endpoint is pretty gnarly and not something that's immediately available in our code unfortunately and is partly why it's not documented today. We'd love to see this happen though and I'll track it internally.
Thanks @remi-stripe ! I think the "webhooks" root description in openAPI, will be really a great addition! Stripe already have all the webhook events - with specific data types. We just need to have a good list of those in the openAPI spec.
Then we can run all the code generators for webhooks :)