-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Add search capability to find books by name or author.
User Story
Given books exist
When I search by keyword
Then I should get matching books
Endpoint
GET /books/search?q=<keyword>
Tasks
- Create
/books/searchroute - Parse
qquery param - Implement search logic:
- Match against
name - Match against
author
- Match against
- Use partial matching (LIKE / ILIKE)
- Handle empty query
- Add Swagger documentation
Acceptance Criteria
- Returns matching books
- Case-insensitive search
- Partial matches work
- Empty query returns
400 - Swagger UI supports testing
Testing Steps
-
Add sample books
-
Test:
/books/search?q=harry -
Verify results include matching name/author
-
Test empty query → expect
400
Definition of Done
- Search implemented
- Edge cases handled
- Swagger updated
- Code linted and formatted
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Projects
Status
Backlog