Skip to content

feat: integrate Swagger OpenAPI documentation#109

Open
hashhhh-16 wants to merge 2 commits into
Sitaram8472:mainfrom
hashhhh-16:feat/swagger-api-docs
Open

feat: integrate Swagger OpenAPI documentation#109
hashhhh-16 wants to merge 2 commits into
Sitaram8472:mainfrom
hashhhh-16:feat/swagger-api-docs

Conversation

@hashhhh-16

Copy link
Copy Markdown

Summary

Integrated Swagger/OpenAPI documentation into the backend to provide centralized, interactive API documentation for contributors and developers.

Changes Made

  • Added swagger-ui-express and swagger-jsdoc

  • Configured Swagger UI at /api-docs

  • Added OpenAPI 3.0 specification setup in server.js

  • Documented Authentication endpoints:

    • POST /api/auth/register
    • POST /api/auth/login
    • POST /api/auth/forgot-password
    • POST /api/auth/reset-password
  • Documented Notice endpoints:

    • GET /api/notices
    • POST /api/notices
  • Organized endpoints using Swagger tags for easier navigation

Testing

  • Verified Swagger UI loads successfully at /api-docs
  • Verified Authentication endpoints appear correctly in the documentation
  • Verified Notice endpoints appear correctly in the documentation
  • Confirmed endpoint grouping and request/response documentation are rendered properly

Acceptance Criteria Checklist

  • Swagger/OpenAPI is successfully integrated into the backend
  • API documentation is accessible through a dedicated route
  • Core endpoints are documented with request and response details
  • Authentication-related endpoints are clearly documented
  • Documentation is easy to navigate and maintain

Closes #106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add Automated API Documentation with Swagger/OpenAPI

1 participant