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

averageRating getting from 2 endpoints has a different data type. #306

Open
TetianaPerinha opened this issue May 29, 2024 · 3 comments · Fixed by #254
Open

averageRating getting from 2 endpoints has a different data type. #306

TetianaPerinha opened this issue May 29, 2024 · 3 comments · Fixed by #254
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@TetianaPerinha
Copy link
Collaborator

Describe the bug
Product averageRating getting from endpoints -
/api/v1/products and /api/v1/products/{productId}/reviews/statistics has different data type.

/api/v1/products/{productId}/reviews/statistics has "avgRating": "string" - <class 'str'>
/api/v1/products has "averageRating": 0 - <class 'float'>

@TetianaPerinha TetianaPerinha added bug Something isn't working good first issue Good for newcomers labels May 29, 2024
@barkev01
Copy link

I can't seem to find the ProductInfoDto class file. Maybe the avgRating field in the DTO is a String ?

@TetianaPerinha
Copy link
Collaborator Author

I can't seem to find the ProductInfoDto class file. Maybe the avgRating field in the DTO is a String ?

I compared the avgRating from JSON responses and got an error in a test that I tried to compare a different type of data.

This was linked to pull requests Jun 16, 2024
@Adit014
Copy link

Adit014 commented Oct 5, 2024

Is this closed. I see a PR is closed but the issue is still open.
let me know if this is closed or else I can pick it up.

PS - I'm new to open source contribution so also let me know if I'm misunderstanding something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
3 participants