Given the following scenario:
Teacher entity
{ "id": "1234", "name": "Mr. Didactic", "Subject": "History", "Classroom": "1A" }
REST API endpoint:
/teacher/id/1234
Let's say I submit a POST (update) request to the endpoint with this request body:
{
"id": "1234",
"name": "Mr. Didactic",
"Subject": "History"
}
How should that be handled/interpreted? Is Classroom
being requested to be set to null/empty?
Or is it untouched, i.e. don't do anything to Classroom, it's not part of the request?
Or is there some other way of interpreting this? What's expected, or are the best practices here?