Trying out the Swagger documentation

To browse the Swagger documentation, we will use the embedded Swagger viewer. If we open the http://localhost:8080/swagger-ui.html URL in a web browser, we will see a web page that looks something like the following screenshot:

Here, we can find the following:

  • The general information we specified in the SpringFox Docket bean and a link to the actual Swagger document, http://localhost:8080/v2/api-docs
  • A list of API resources; in our case, the product-composite-service API
  • At the bottom of the page, there is a section where we can inspect the models that are used in the API

This is how it works:

  1. Click ...

Get Hands-On Microservices with Spring Boot and Spring Cloud now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.