Spring-Boot-Blog-REST-API icon indicating copy to clipboard operation
Spring-Boot-Blog-REST-API copied to clipboard

feature/api-documentation- Add OpenAPI (Swagger) UI for API Documentation in Spring Boot Application

Open Mohammad-Husen-Mulla opened this issue 7 months ago • 0 comments

Description:

This pull request integrates OpenAPI (formerly Swagger) UI into our Spring Boot application to enhance API documentation.

Changes Included:

  1. Added OpenAPI Dependencies: Included dependencies for OpenAPI (Swagger) in the pom.xml.
  2. Configured OpenAPI: Spring Boot auto-configures OpenAPI, so no additional configuration is required for basic usage.
  3. Updated Project Files: Added the necessary dependency configurations, Annotations inside the main application class and inside all the controllers

Benefits:

  • Enhanced API Documentation: Provides a modern and interactive web interface for developers to explore and test API endpoints.
  • Improved Usability: Offers an easy-to-navigate and user-friendly interface for understanding and interacting with the API.

Screenshot:

Spring-boot-rest-swagger-ui

How to Test:

1. Run the Application:

  • Start the Spring Boot application using mvn spring-boot:run.

2. Access OpenAPI UI

  • Navigate to http://localhost:8080/swagger-ui/index.html#/ (replace 8080 with the port your application is running on)

3.Verify Documentation:

  • Ensure that the OpenAPI UI displays all available API endpoints.
  • Test the interactive features to verify that the endpoints are functional and correctly documented.

Note:

Feel free to adjust the port number and version of dependencies as per your project's specifics. Let me know if there’s anything else you need!

Developer Request:

As a junior developer, I'm still in the learning phase with these technologies. If you notice any mistakes or areas for improvement in the codebase I've worked on, please let me know. I appreciate any feedback and suggestions for further improvement. Thank you for your understanding and support! 👍🚀

Mohammad-Husen-Mulla avatar Jul 31 '24 15:07 Mohammad-Husen-Mulla