I'm not sure what the expected behavior would be for the following scenarios:
PATCH Request 1:
"body": {
"un_updatable_field" : "data"
}
So here I'd simply throw an exception: Field cannot be updated
, whatever.
PATCH Request 2:
"body": {
"all_required_fields" : "all",
"un_updatable_field" : "data"
}
What should I do here? Throw an exception and don't update the model?
Patch
operations should be atomic, per the spec:It looks like your specific case would be
a
409 Conflict
might also be appropriate, depending on the reason the resource cannot be modified.