swagger icon indicating copy to clipboard operation
swagger copied to clipboard

Support for OpenAPI 3.1.0 "webhooks" Property

Open sperber-rbi opened this issue 3 years ago • 2 comments

Is there an existing issue that is already proposing this?

  • [X] I have searched the existing issues

Is your feature request related to a problem? Please describe it

As of version 3.1.0, OpenAPI now supports a top level "webhooks" keyword, for any webhooks which may be implemented by a consumer. The final definition may be found here.

Describe the solution you'd like

Implement a PR to allow defining webhooks within the generated OpenAPI document. I am happy to help develop said PR, however I would appreciate guidance on the appropriate implementation.

I imagine the ideal solution would be for us to be able to infer the defined webhooks from the application provided to the createDocument method, however I'm unsure what the mechanism would be to then register webhooks on a module, and I worry this change would then be out of the scope of this package. So I'd appreciate guidance from someone more familiar with Nest to propose an implementation.

Teachability, documentation, adoption, migration strategy

No response

What is the motivation / use case for changing the behavior?

I would like to be able to document webhooks within my application

sperber-rbi avatar Feb 17 '22 09:02 sperber-rbi

Would you like to create a PR for this issue?

kamilmysliwiec avatar May 06 '22 17:05 kamilmysliwiec

@kamilmysliwiec Could i upgrade the library to OpenAPI 3.1.0?

alenap93 avatar Jan 15 '24 11:01 alenap93