Skip to content
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

GET product reviews request with an invalid value of param "product_rating" the system returns all product reviews. #330

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

Prankurtiwari
Copy link

@Prankurtiwari Prankurtiwari commented Jun 25, 2024

Problem

If "%" is pass then system doesn't receive it making List<Integer> productRating null, that passes all the validation and display all the relevant records.Link

Proposed Solution

Added a validation for null List<Integer> productRating so that user get the error message to add rating.
If we want to pass actual "%" then the correct way is passing %25. FYI system request that request.

Ripple Effect

Adding that check will change the non required productRating as it is a required field now.

Problem in Hand

How backend system will distinguished
CASE1: productRating = %
CASE2: (productRating not sent)
as for that system both are null.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello there!

Thank you for your contribution! We're delighted to see your Pull Request in our GitHub repository. Your efforts make a difference. Thanks a lot!

@Prankurtiwari Prankurtiwari changed the title Added product rating fix GET product reviews request with an invalid value of param "product_rating" the system returns all product reviews. Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant