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

Possible strategies to use Swagger

Swagger is mostly used for documenting services and testing services out. There are two fundamental approaches in implementing Swagger. They are as follows: 

  • Top-down or design-first approach: Here, Swagger Editor is used to create Swagger definitions and then Swagger Code-gen is used to generate code for the client as well as the server. Swagger will be used to design the API and source before any of the code has been written.
  • Bottom-up approach: Here, for any of the existing APIs, Swagger is used to generate documentation.

We will look at both of the approaches along with the best practices available for us.

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