Spring Boot REST API project with Swagger UI (OpenAPI) using SpringDoc
Create a Spring Boot project named restapi, then visit the Maven repository to search for the SpringDoc OpenAPI Starter WebMVC UI dependency. Copy the dependency and add it to your pom.xml file. After that, start the server and run your application. Finally, open your browser and navigate to http://localhost:8080/swagger-ui/index.html to view the Swagger UI documentation.