Added comprehensive due date functionality to the FastAPI todo application:
API Enhancements:
- Updated main /todos endpoint with due date query parameters (overdue, due_soon, due_date_from, due_date_to)
- Added sort_by parameter supporting "due_date" and "created_at" options
- Enhanced existing endpoints to handle due_date in responses
New Specialized Endpoints:
- GET /api/v1/todos/overdue - Get all overdue todos with pagination
- GET /api/v1/todos/due-soon - Get todos due within next N days (default 7)
- GET /api/v1/todos/due-today - Get todos due today with date range filtering
Technical Improvements:
- Added comprehensive OpenAPI documentation with parameter descriptions and examples
- Implemented proper date validation and timezone handling
- Added date utility functions for consistent date operations
- Enhanced error handling for invalid date parameters
- Added proper FastAPI Query parameter validation with regex patterns
Migration & Schema Updates:
- Created migration 007 to add due_date column with timezone support
- Added database index on due_date for optimal query performance
- Updated Todo model with computed properties (is_overdue, days_until_due, is_due_soon)
- Enhanced schemas with due_date field validation and Field descriptions
All endpoints follow existing API patterns with pagination, filtering, and comprehensive documentation.