Spring Boot REST API Documentation with Swagger 2

This tutorial will show you how to use swagger 2 using spring boot application for creating RESTful documentation. We create and deploy REST services but we do not have an option to let others know in a single place, where REST services are exposed for consumption. We do not have option to let others know that these are the methods, request body, request params for these exposed REST services. But luckily we have got simple but powerful API called swagger through which we can document such RESTful services in a single place in order to let others know about every details (request URI, request body, request params, request method etc.) of the exposed REST services. This API is third party API because developers do not have option to generate RESTful documentation using JAX-RS (JSR-339). After completing the Spring Boot REST API Documentation with Swagger 2 example, you will understand the usage of this wonderful API and you will be able to apply the similar concept for your own projects.

Continue reading “Spring Boot REST API Documentation with Swagger 2”

Documenting Spring REST API with Swagger 2

When creating a REST API, good documentation is instrumental.

But developers do not have any option using JSR-339 to generate any documentation on all these APIs so other developers could quickly understand how to use them. For sure, it would be just awesome to generate verbose and easy to follow documentation from source code, and but the help is coming in a form of Swagger.

Essentially, Swagger does a simple but very powerful thing: with a bit of additional annotations it generates the REST API descriptions such as HTTP methods, path / query / form parameters, responses, HTTP error codes etc) and even provides a simple web UI to play with REST calls to your APIs.

You may also like to explore Spring Boot REST API Documentation with Swagger 2 and  Documenting REST API using Swagger

Continue reading “Documenting Spring REST API with Swagger 2”

Swagger REST API

Using JAX-RS API under JSR-339, it is easy to create REST services using excellent Java platform. But developers do not have any option using JSR-339 to generate any documentation on all these APIs so other developers could quickly understand how to use them. For sure, it would be just awesome to generate verbose and easy to follow documentation from source code, and but the help is coming in a form of Swagger.

Essentially, Swagger does a simple but very powerful thing: with a bit of additional annotations it generates the REST API descriptions such as HTTP methods, path / query / form parameters, responses, HTTP error codes etc) and even provides a simple web UI to play with REST calls to your APIs.

You may also like to explore Spring Boot REST API Documentation with Swagger 2 and  Documenting Spring REST API with Swagger 2

Continue reading “Swagger REST API”