Skip to content

Conversation

@Priyans-hu
Copy link
Owner

@Priyans-hu Priyans-hu commented Jan 18, 2026

Summary

  • Fixed typo: mtrericmetric in metrics router and controller
  • Added pagination support to services and incidents endpoints:
    • GET /services now accepts page and page_size query params
    • GET /incidents now accepts page and page_size query params
    • GET /incidents/active now accepts page and page_size query params
  • Created PaginatedResponse schema for consistent pagination responses
  • Set up pytest testing infrastructure with SQLite test database
  • Added service endpoint tests

Test plan

  • Run pytest tests/ to verify test setup
  • Test pagination: GET /services?page=1&page_size=10
  • Test pagination: GET /incidents?page=1&page_size=10
  • Verify response includes items, total, page, page_size, total_pages

- Fix mtreric -> metric typo in metrics_router.py and metrics_controller.py
- Add pagination schema with PaginatedResponse generic type
- Implement pagination for GET /services endpoint
- Implement pagination for GET /incidents and GET /incidents/active endpoints
- Add page and page_size query params with validation (max 100 items)
- Add testing infrastructure with pytest fixtures and test_services.py
@Priyans-hu Priyans-hu merged commit ce7966b into main Jan 18, 2026
2 checks passed
@Priyans-hu Priyans-hu deleted the feat/code-quality-improvements branch January 18, 2026 22:19
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.

2 participants