Skip to main content

Posts

Showing posts with the label swagger with rest

Swagger2 implementation in Spring boot

What is Swagger Using swagger we can describe our REST APIs without much effort. We just need to do some minimal configuration and it provides a complete UI which describes all our endpoints along with interface to execute them using web browser without any additional plugin. Also it is customisable so we can add descriptions and other orchestration to our APIs. Why Swagger When we have a REST API and we want to share it with our users, we need to provide them all the documentation and specification for our APIs which requires some effort to prepare them. With the help of Swagger UI we can share the Swagger URL for our service where users not only see all the listed operations but they can play also with those APIs using web browser. Implementing Swagger in Spring boot application Now we will see how to use Swagger in our spring boot application. Maven dependencies Below dependencies are required for Swagger. "sringfor-swagger-ui" is required if you want Swagg...