-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating a resource to null/remove a field #34
Comments
Do we have usecases for nulling out fields? I can see value only when we talk about labels/ parameters (to remove a label or to remove a particular value of a label) but that should be already supported by the suggested approach to patch labels. P.S. It's also debatable if the way suggested currently is the best to patch labels or managing labels as a subresource API would be better. |
Any optional field (even if its an extension) might need to be null'd out (or removed) - so we need a way to support it. |
Details about this should be now present as part of #31. |
PATCH is used to update a resource and missing fields of the request are treated as "non-changed" fields - we should then provide a mechanism to delete (or null out) a field. I would suggest that passing in "null" to mean null out a field - and I would make a "null" value for a field the same as deleting the field. I'm not sure there's value in an optional field being there with a value of "null".
The text was updated successfully, but these errors were encountered: