-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Implement an endpoint to fetch a single book by its ID.
User Story
Given a book exists
When I request it by ID
Then I should receive that book’s details
Endpoint
GET /book/:id
Tasks
-
Create
GET /book/:idroute -
Validate
idparam -
Fetch book from DB
-
Handle not found case
-
Return book data
-
Add Swagger documentation
- Define path param
- Add responses (200, 404)
Acceptance Criteria
- Valid ID returns
200 OKwith book - Non-existent ID returns
404 Not Found - Invalid ID returns
400 Bad Request - Swagger UI supports testing
Testing Steps
-
Create a book
-
Copy its
id -
Send GET request:
/book/:id -
Verify response is
200 OK -
Test with invalid/non-existent ID → expect
404
Definition of Done
- Endpoint implemented
- Validation handled
- Error handling works
- Swagger docs updated
- Code linted and formatted
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Projects
Status
Backlog