-
Notifications
You must be signed in to change notification settings - Fork 16
Delete attribute with patch? #597
Comments
IMO, this is part of a larger problem, which is that the semantics of our PATCH operation are a little underspecified. RFC 5789 says that a PATCH request includes "instructions" describing how to modify a resource, but leaves it up to implementors to define those instructions and their semantics, and I don't think we do a good job of specifying that. A single PATCH operation can modify both a record's data and its permissions, and they behave differently -- Rather than defining our own semantics, we could borrow existing semantics, such as RFC 7396, JSON Merge Patch or (my personal favorite) RFC 6902, JSON Patch, which (as an added bonus) gives us a clear way to remove attributes. But that seems pretty heavyweight, and it might not even matter too much because there's no way to support this in combination with encryption. So maybe we should just build primitives in our client libraries that let us express changes directly. |
Could you detail that part please ? I don't think permissions behave differently than data. Every key in the permission is replaced by the value provided in the PATCH payload.
+1 I couldn't study the propositions in detail, but would be happy to work on that together some day ! Related: |
You're right! I'm sorry, I totally misunderstood what was going on with that. |
Fix crash when a cache expires setting is set for a specific bucket or collection
Currently, there is no way to remove an attribute of a record with a
PATCH
request.I propose that when a
None
value is provided for an attribute, it is removed from the record.Thoughts ?
The text was updated successfully, but these errors were encountered: