Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on One-to-one relationships and subresources in REST APIs.
Is the user bringing a cart (/user/<USER_ID>/cart/<CART_ID>)?
Is he bringing his own cart (/user/<USER_ID>/cart)?
Is the store supplying a cart for the user (/cart)?
Applying real world objects and thinking, makes more sense in my mind. The third option instinctively is the most suitable way to go (IMO).
There are no comments on this comment yet.
Is the user bringing a cart (/user/<USER_ID>/cart/<CART_ID>)?
Is he bringing his own cart (/user/<USER_ID>/cart)?
Is the store supplying a cart for the user (/cart)?
Applying real world objects and thinking, makes more sense in my mind. The third option instinctively is the most suitable way to go (IMO).