In my api built with rest_framework
(python) I can perform the update of a record however I have to pass all fields that this record has for example if I want to update only the email with record 1 I have to inform all fields in the request, see:
PUT for host: 8000 / user / 1
{
"name": "Arnaldo Pereira da Silva",
"department": "Vendas",
"email": "[email protected]" // antigo email era [email protected]
}
But I would like to send only the data I would like to use as follows:
PUT for host: 8000 / user / 1
{
"email": "[email protected]"
}
If I try to send only the email I get a message that the other fields are required, how do I inform the rest_framework
that I can only update 1 field or that the fields are not mandatory?