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 · 2 comments · Fixed by #254
Open

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

TetianaPerinha opened this issue May 29, 2024 · 2 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
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
2 participants