Generate OpenAPI/Swagger definition for APIFunction with Wolfram Language?

I would like to have a function which automatically generates a OpenAPI (fomerly Swagger) JSON definition file for a Wolfram APIFunction. I’m wondering if anyone has done this already. Thanks in advance for your help.
[1]: https://www.openapis.org/