-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Implement an endpoint to fetch all book records from the database.
User Story
Given books exist in the database
When I request all books
Then I should receive a list of books
Endpoint
GET /books
Tasks
-
Create
GET /booksroute -
Create controller for fetching books
-
Fetch all records from
bookstable -
Handle empty state (return empty array)
-
Return response with list of books
-
Add Swagger documentation
- Define endpoint
- Add response schema (array of books)
Acceptance Criteria
- Endpoint returns
200 OK - Response contains array of books
- Empty DB returns
[] - Swagger UI supports testing
Testing Steps
-
Ensure at least one book exists
-
Send GET request to
/books -
Verify response is
200 OK -
Confirm response is an array
-
Match data with DB:
SELECT * FROM books;
Definition of Done
- Endpoint implemented
- Data fetched correctly
- Swagger docs updated
- Code linted and formatted
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Projects
Status
Backlog