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:
- Click on the product-composite-service API resource to expand it. You will get a list of operations that are available on the resource.
- You will only see one operation, /product-composite/{productId}. Click on...