<dependency> <groupid>io.springfox</groupid> <artifactid>springfox-swagger2</artifactid> <version>2.6.1</version> </dependency> <dependency> <groupid>io.springfox</groupid> <artifactid>springfox-swagger-ui</artifactid> <version>2.6.1</version> </dependency>
You’ll then get a ready-made documentation for all your REST API endpoints. An example of how this looks like can be seen here.
While this already is very useful in that it helps with properly documenting your software, especially that part of it that will be consumed by other components, another, probably lesser-known feature of Swagger or rather part of the Swagger tool suite is Swagger Codegen (source code available here), which allows you to generate client SDKs for REST APIs documented with Swagger.
Supporting a wide variety of languages (currently more than 20) and client frameworks Swagger Codegen not only removes tedious plumbing from the development process but also provides tried and tested code for accessing REST APIs, which helps tremendously with improving the reliability and maintainability of client code.
Instead of constantly re-inventing the wheel when dealing with REST APIs you can just have Swagger Codegen create REST API servicing code for you.