openstorage icon indicating copy to clipboard operation
openstorage copied to clipboard

trailing / in API specification should be removed

Open paravmellanox opened this issue 7 years ago • 2 comments

I like to fix the API specification for following functionalities in http://api.openstorage.org. All of them have trailing / after {uuid} as {uuid}/.

  1. Delete Volume
  2. Inspect Volume
  3. Change Volume state
  4. Retrieve Volume *

In general most REST services /resource/ indicates set of resources. Here in above methods, interest is particular volume described by uuid. So trailing / is confusing, which should be removed.

There are few good examples describing why trailing slash confuses and should be avoided while describing a specific resource. (1) http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api#restful (2) Applied Web Services section in https://en.wikipedia.org/wiki/Representational_state_transfer#Example (3) https://softwareengineering.stackexchange.com/questions/186959/trailing-slash-in-restful-api

Who are the author of the http://api.openstorage.org? As this is more of documentation bug, I like to contact the author(s).

paravmellanox avatar Aug 17 '17 04:08 paravmellanox

Thanks @paravmellanox for pointing this out. The best would be to submit a PR against https://github.com/libopenstorage/specs/blob/master/api/openstorage.yaml. ping @brianhama

jvinod avatar Sep 09 '17 21:09 jvinod

@pault84 pls follow up on this.

venkatpx avatar Oct 24 '17 20:10 venkatpx