Open alex-knowles opened 7 years ago
This might warrant a separate issue in itself, but on the topic of path names, I suggest categorizing "comments" as a sub-collection of poems.
For example, to request an index of comments for a given poem, a RESTful client might expect the form:
GET /api/poems/{id}/comments
I agree on the plural resource names.
I suggest categorizing "comments" as a sub-collection of poems.
However, I don't think this particular change makes sense for our use cases. We really need to flesh it out some more, but a poem could have different sets of comments on it in different contexts. For example, a poem could exist in the global database and have comments on it in a non-session context. It could also be part of multiple clubs' sessions and have comments on it in the context of each of those sessions.
Currently, the following routes exist:
Note that all collection names, except for "comments", are singular.
However, RESTful naming conventions recommend the plural form for resource collections.
Excerpt:
Consider using the following plural forms instead: