Swagger provides some additional annotations required on top of existing Spring MVC annotations. Let's see the following example using these annotations.
In the microservice application, each REST controller that is supposed to be documented should be annotated with the @Api annotation:
@Api( value = "/customer", description = "Manage Customer" ) public class CustomerController { // ... }
The CustomerController class has been annotated with the @Api annotation with the value and description attributes. The @Api annotation narrates the description about the responsibilities of the controller.
Next, each request handler methods of the Rest Controller class that is supposed to be documented should be annotated ...