Currently PUT and PATCH on books allow updating fields that should never change,
and don't check if the book is currently on loan before applying updates.
Tasks
- Block isbn and type from being updated in both PUT and PATCH
- Block all PUT and PATCH operations if book available = false (book is physically on loan)
- Validate type mismatch on PATCH — if DTO type doesn't match existing book type throw an error
e.g. patching a HistoryBook with ScienceBookDTO should return a clear error
Currently PUT and PATCH on books allow updating fields that should never change,
and don't check if the book is currently on loan before applying updates.
Tasks
e.g. patching a HistoryBook with ScienceBookDTO should return a clear error