Re:How to (and how not to) design REST APIs
by LAC-Tech on Wednesday November 22, 2023 @08:51PM
(#38388191)
English pluralisation rules are a non issue. 1.5 billion people world wide speak English, and I'll forgive some of them if they accidentally make a gooses URL instead of a geese one.
[ Parent
| on HN ]
Re:How to (and how not to) design REST APIs
by jacknews on Wednesday November 22, 2023 @09:27PM
(#38388470)
Why have plural at all. All rest urls except index, which is easily discernible because it has no id, make more sense in the singular:
get /ticket/12
patch /ticket/12
put /ticket
The problem is not humans getting confused by 'gooses', but that sometimes your code has to do the mapping, and there are plenty of edge-cases. Just avoid the issue entirely by sticking with singular throughout.