I am using flask_restplus swagger in flask for api documentation. I want to create a model definition for an api that post data to the database. My problem is that, data is in array form. I am sending data in following format with post request.
{
"user_id" : 3,
"product" : [
{
"product_id" : 33,
"total_price" : 50,
"quantity": 2
},
{
"product_id" : 18,
"total_price" : 40,
"quantity": 2
}
]
}
How we can define model for this type of structure? I am sending data in body.