I need to automatically generate documentation from Java API code written by someone else using the Jersey framework. The project is built using Gradle. I'm trying to figure out how to use Swagger for this purpose but can't. I found a page (https://www.tutorialspoint.com/spring_boot/spring_boot_enabling_swagger2.htm) where it says I need to add some lines to the build.gradle file but I don't know where and also the page is for the Spring API.
How can I use Swagger here?