First, i would like to apologize since i have no choice but to discuss a lab solution
I’m at this lab. I’ve edited the problem_schema.json according to the instruction available, and after validating, i received a rather confusing error message :
- Is the top_five_reviews is required or not? If it is, then why it is not allowed?
- is the top_five_questions is required or not?
In short : why is something that is required is not allowed?
My current solution is as follows :
Solution
{
“_id”: “objectId”,
“item_code”: “string”,
“name”: “string”,
“maker_brand”: “string”,
“price”: “decimal”,
“description”: “string”,
“materials”: [“string”],
“country”: “string”,
“image”: “string”,
“available_sizes”: {
“mens”: [“string”],
“womens”: [“string”]
},
“package_weight_kg”: “decimal”,
“average_rating”: “decimal”,
“stock_amount”: “int”,
"top_five_reviews ": [{
“author”: “string”,
“text”: “string”,
“rating”: “int”
}],
"top_five_questions ": [{
“author”: “string”,
“text”: “string”,
“likes”: “int”
}]
}