O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Top-down or design-first Approach

Often, generating a valid Swagger file and documentation via just adding a few lines of code seems like a good idea. We have written all the code and then we remember: Oh my goodness, how will I explain this to others? Will I need to document each and every API? On the fly generation of documentation at such time simply by adding an annotation seems to be a dream come true in such situations.   TSOA (https://www.npmjs.com/package/tsoa) is designed on such a principle. Based on TSOA README file, it generates a valid Swagger spec from a written controller and models that include the following. This essentially is a bottom-up approach where we already have an existing REST API and we leverage Swagger to document ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required