-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scooter: Field validation + Exception handling + DTOs + delete a scooter by id. #28
base: master
Are you sure you want to change the base?
Scooter: Field validation + Exception handling + DTOs + delete a scooter by id. #28
Conversation
…oter function + rebase cleanup added the delete scooter function added validation to fields and created dtos for the scooter model
|
I don't know the advantage. It was just a wrong import. :) Fixed. |
No. I changed to ignore-case. |
Yes. If an Exception occure we log the stackTrace. (Exception.class) |
I think the class name is descriptive enough. Removed these comments from the class. |
Ups. I don't think so. I change it to 404 then. |
Its helpful because on the client side the status code value as number can be used directly without any parsing and checking. |
No. I think I did this accidentally. :). Fixed. |
I use DTOs for validation and data hiding so the user can't send the a Scooter with a battery status. The other reason is the use of reflection which automatically parses the model with the default constructor and I can't specify which constructor is called in that phase. So If I don't use dto for the scooter then I can't limit the user to send a scooter request(POST) without a battery status. I am open for any other suggestions. But this is the only solution that I see working right know. |
Tasks: