Open TetianaPerinha opened 6 months ago
Hi @TetianaPerinha, I would like to work on this issue. Let me know If I can start on this.
Hi @TetianaPerinha, I would like to work on this issue. Let me know If I can start on this.
Hi, @palvaibhav I have assigned this task to you, you can work on it.
@TetianaPerinha I need some help with the project setup. I don't seem to find few files in the development branch. e.g. ProductReviewRequest
This file is missing.
@TetianaPerinha I need some help with the project setup. I don't seem to find few files in the development branch. e.g.
ProductReviewRequest
This file is missing.
It seems this com.zufar.icedlatte.openapi
whole package is not there. Am I missing something ? @Sunagatov
Describe the bug When sent request post the review with empty rating, system should reject the request and return clear error message.
Precondition: user registered and got Bearer token, user has not posted a review on a product yet.
Step to reproduce: Execute a request like the below with a valid token : curl --location 'https://iced-latte.uk/backend/api/v1/products/ba5f15c4-1f72-4b97-b9cf-4437e5c6c2fa/reviews' \ --header 'Content-Type: application/json' \ --header 'Authorization: {token}' \ --data '{ "text": "Espresso is a beloved coffee that stands as the foundation of many coffee beverages, cherished for its rich, intense flavor and versatility. When crafted correctly, an espresso shot is a concentrated, full-bodied coffee experience that delights the senses. The perfect espresso shot starts with high-quality coffee beans, meticulously sourced and freshly ground just before brewing. ", "rating": "" }'
Expected behavior The system should reject a request and return an error message = "Rating or review should be filled in", "HTTP status code": 400
Actual result The system rejects a request with "HTTP status code": 400, and anunclear error message = "[{ ErrorMessage: must not be null }]