3 ms·
I've implemented an API against this and think it's pretty good. http://microcosm-cc.github.io/#conversations-single-patch http://microcosm-cc.github.io/#conve
by buro9 12y ago
I've implemented an API against this and think it's pretty good.
http://microcosm-cc.github.io/#conversations-single-patch http://microcosm-cc.github.io/#conversations-single-patch
We didn't implement the entirety of the standard as our resources are fairly small and simple and it would have been overkill.
The scenario we had is that we needed to take a set of changes to a resource, but parts of the JSON document are permissioned differently. i.e. You might have permission to change the document body, but not some audit trail meta data returned as part of the resource.
Treating patches as a batch of operations to be performed on a document (usually within one transaction) is a good way to do the processing for this scenario.
I know that there are other approaches, such as calculating a diff and just sending that... but describing operations does make the system less fragile and does make it easier for scenarios like the one we had where you could not assume that the entire resource is under a single permission structure.