-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Motivation
The legislation search is the most complex public query — it supports full-text search across multiple fields plus multi-filter. This is a signature feature of the site.
Deliverables
- Implement
GET /api/legislation— paginated, filterable bysearch(matches title, bill_number, summary, full_text),status,type,session,sponsor; defaults to current session - Implement
GET /api/legislation/:id— single legislation with nested actions list, ordered bydisplay_order - Implement
GET /api/legislation/recent— returns most recent legislation; filterable bylimit(default 10) andtype(e.g., "Nomination" for the Recent Nominations page) - Create router file:
app/routers/legislation.py - Register router in
app/main.py - Write integration tests covering: search by keyword, filter by status, filter by type, pagination, detail with actions
Important Notes
- Depends on SQLAlchemy Models — Legislation, Events, Carousel, Finance, Budget #5 (Legislation, LegislationAction models), Pydantic Schemas — Public Output DTOs #10 (DTOs), Public API Routes — News & Senators #6 (pagination)
- For search, use SQL
LIKEwith%keyword%on title, bill_number, summary — full-text indexing is a stretch goal - The
/recentendpoint must be registered BEFORE/:idin the router to avoid route conflicts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels