Trying out the OpenAPI documentation
To browse the OpenAPI documentation, we will use the embedded Swagger UI viewer. If we open the http://localhost:8080/openapi/swagger-ui.html URL in a web browser, we will see a web page that looks something like the following screenshot:
Here, we can ascertain the following:
The general information we specified in the springdoc-openapi
OpenAPI
bean and a link to the actual OpenAPI document, /openapi/v3/api-docs, pointing tohttp://localhost:8080/openapi/v3/api-docs
.Note that this is the link to the OpenAPI document that can be exported to an API Gateway, as discussed in the Introduction to using springdoc-openapi section above.
- A list of API resources; in our case, the ProductComposite API.
- At the bottom of the page, there is a section where we can inspect the schemas used in the API.
Proceed with the examination of the API documentation as follows:
- Click on the ProductComposite...