4 ms·
I'm unconvinced. A singular resource name implies a singleton resource, e.g. /account, which is a singleton as far as the user is concerned. It's a simple patte
by sjtgraham 15y ago
I'm unconvinced. A singular resource name implies a singleton resource, e.g. /account, which is a singleton as far as the user is concerned. It's a simple pattern: singular > singleton, plural > collection.
Github does all kinds of non-standard stuff like putting the requested response format in the URI path instead of as an extension, e.g. "http://github.com/api/v2/json/repos/search/ruby+testing http://github.com/api/v2/json/repos/search/ruby+testing. So just because Github has done it, doesn't mean everyone else should too.
- stanleydrew 15y agoIt makes no difference whether the response content type is in the URI as a path segment or as an "extension"; both are wrong from a pure ReST perspective.
- sjtgraham 15y agoWho said anything about REST?
- stanleydrew 15y agoWell the original article is ostensibly about ReST. So when you claimed that Github did some other things in a "non-standard" way I assumed you were referring to ReST.
- jdp 15y agoGithub has also remedied that in their 3rd version of the API. For example, their issues comments collection is exposed through the URI /repos/:user/:repo/issues/comments/:id That could be related to their decision to use only JSON as the interchange format though.