I have a resource which has some attributes that are read only (because they are calculated). I want these attributes to be available on GET but they will not change if there is a POST/PATCH.
What do I do for POST/PATCH? In the case where a client performs a GET, updates the object and sends it back as a PATCH, I don’t want to throw an error because they are sending back some read only attributes too. However, I do want them to know that the attribute will be ignored because it is read only. The client can then make the adjustments.
Does the specification allow for this?
I think perhaps the best solution is not to throw an error - because updating the resource is fine but to use the meta information to explain that some attributes are calculated and will be ignored. Is there a better way?