By convention, an HTTP request targeting a single entity item contains the lowercase, singular version of the entity type name. For example, if the entity type entityName is "Hero", the default data service will POST to a URL such as 'api/hero'.
Our rest api was designed to always use the plural name for the resource(s). How can I configure @ngrx/data to always use the plural resource name for any http requests? I feel like I'm probably missing the obvious.
[x ] Yes (Assistance is provided if you need help submitting a pull request)
[ ] No
I think we go through this in our docs.
If this doesn't provide enough information, please feel free to re-open the issue.
Thanks for the example. I'm glad there's an example in the docs.
Two notes:
pluralNames property. Would it be possible to add that?I recently got hit in the face with this one. This design decision is baffling to me. RESTful resources should all share the same convention...
GET products
GET products/1
PUT products/1
POST products
DELETE products/1
I've never seen any RESTful resource alter the pluralization within a single resource. Why did you guys decide to make people jump through hoops for following web standards?
Most helpful comment
I recently got hit in the face with this one. This design decision is baffling to me. RESTful resources should all share the same convention...
GET products
GET products/1
PUT products/1
POST products
DELETE products/1
I've never seen any RESTful resource alter the pluralization within a single resource. Why did you guys decide to make people jump through hoops for following web standards?