Using Swagger in a microservice

Let's see the example of creating a REST API for Account microservice as we have used this example in this book, any REST API must have good documentation with usage.

Managing and creating documentation is a tedious job, so, we have to move with automation of the process. Such that every change in the API should be simultaneously described in the reference documentation. Swagger comes into the picture to automate the documentation process of a REST API.

In this section, we will discuss the usage with examples of Swagger 2 for a Spring REST web service. We will use the SpringFox implementation of the Swagger 2 specification in this example.

We will explore some examples of the Account microservice of the previous chapters, so, let's start by adding Maven dependencies for the SpringFox implementation of Swagger 2 in the pom.xml file of the Account microservice example.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.85.181