In this video I have shown different scenarios we might encounter in real world and how do we make sure all are addressed in our service REST we have expose for outer world. Link to the presentation: docs.google.co...
This was nice demo, one qq: suppose bookId is required field, I user sends empty/ null - is there any way we can validate and send bad request error. Basically can we add validation to request JSON?
400 means you are not sending required param, in your example of 400 you are passing right parameter only value not getting returned...its a wrong example
The book ID is B123, but how is it working when you give the value just 123 on running the service? In my case the the Id goes like BOOK-123, then how should I give the value? Please respond. Even If I give 123 or BOOK-123, I am always getting 400 with error message.