Skip to content

Conversation

@anuragShingare30
Copy link

@anuragShingare30 anuragShingare30 commented Jan 28, 2026

Pull Request

Description

  • Added Swagger UI documentation at /api-docs route
  • Created /docs directory with API definitions separated from controllers/routes
  • Added npm run generate:swagger script to generate documentation locally
  • Configured environment-based docs availability (development only by default)
  • Generated files excluded from version control
  • Enables developers to browse and test API endpoints interactively

Fixes #9

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Documentation update
  • Dependency update
  • Test addition / improvement

Checklist

Code Quality

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested the API endpoints manually (if applicable)
  • I have tested with different data scenarios

Security

  • I have checked for security vulnerabilities in my code
  • I have not hardcoded sensitive information
  • Input validation is properly implemented
  • I have not introduced any new dependencies without review

Performance

  • I have considered the performance impact of my changes
  • I have optimized database queries (if applicable)
  • I have not introduced memory leaks
  • Performance-critical code has been profiled

Testing Evidence

1. Start the server locally at port 3000: `npm run dev`
2. Generate documentation locally: `npm run generate:swagger`
3. Access the docs locally at: `http://localhost:3000/api-docs`

Additional Notes

  • I have not change the README.md file. If needed will add the necessary steps and guide.

Checklist for Reviewers:

  • Code follows project style guidelines
  • Changes are well-documented
  • Tests are adequate
  • No breaking changes (or breaking change is intentional)
  • Database migrations are safe
  • Performance impact is acceptable
  • Security concerns are addressed

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.

Add Swagger API Documentation using swagger-ui-express and swagger-autogen

1 participant