Yes, you can easily create Swagger and OpenAPI documents from TypeScript types using tsoa . The readme file contains all the configuration information that you will need to get started. It is compatible with express, hapi, koa, etc. (Due to the ability to add your own template for your preferred server type):
https://github.com/lukeautry/tsoa
Advantages tsoa has over other libraries:
- it generates a swagger / OpenAPI document and also checks types at runtime
(Full transparency: I am one of the accompanying tsoa. ββBut I was the first consumer of tsoa, ββand I think this is a great product ... that's why I asked for help to save it! :))
Greene creations
source share