Generic vs specific patch formats

Jan Algermissen <[email protected]>
Newsgroups gmane.comp.web.services.rest
Message-ID <[email protected]>
Hi,

trying to wrap my head around the implications of using generic patch media types (e.g. json-patch[1]) vs. specific ones, e.g. application/vnd.bigco.customer-patch.

Generic JSON patch looks sort of fine, but I can make myself stop feeling it's tunneling out of band knowledge.

When the client constructs the patch document, it makes assumptions about the (abstract) structure of the target resource that is essentially out of band knowledge.

You might argue, that the client will have learnt the structure from a previous GET...

GET /customers/42
Accept: application/vnd.bigco.customer+json

200 Ok
Content-Type: application/vnd.bigco.customer+json
ETag: "..."

... and that understanding the *specific* media type (and having an ETag) acts as a counter measure for the patch format being generic.

Alas ... I am not fully convinced.

Thoughts?

Jan


[1] http://tools.ietf.org/html/draft-ietf-appsawg-json-patch
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.