Maintain the swagger documentation by Swagger Editor and then you can use the yaml files to generate online swagger documentation easily with Spring boot.
For the details, access How to host Swagger documentation using yaml/json configuration files?
Start the application and access http://localhost:8080/swagger-ui.html