6 ms·
Found a contradiction that I don't understand. From rule 1: # GOOD GET /products # get all the products GET /products/{product_id} # get one prod
by AlexandrB 3y ago
Found a contradiction that I don't understand. From rule 1:
# GOOD
GET /products # get all the products
GET /products/{product_id} # get one product
# BAD
GET /product/{product_id}
But then in Rule 2:
GET /shop/{shop_id}/listings # normal, expected
Shouldn't that be "/shops/{shop_id}/listings"? Or is it plural only if you can actually GET the path (i.e. there's no GET for just "/shop") and otherwise it should be singular?
- robertlagrant 3y agoPlural or singular seems far too marginal to be good or bad. I use singular.
- iterati 3y agoSame. My table names are also singular.
- prisonality 3y agoI use singular too, but I always wonder to those sticking with plural - what's the convention for words which plural and singular are the same. ie - like 'staff' or 'species' or 'aircraft'. Then I can add suffix to those singular ie - 'staffList', 'speciesList' etc
- stickfigure 3y agoThis is the Etsy API, but actually was a typo on my part. They use the plural /shops (as I showed in the other Etsy example). I've corrected the original article, sorry about that!