diegomvh / angular-odata

Client side OData typescript library for Angular
https://www.npmjs.com/package/angular-odata
MIT License
46 stars 14 forks source link

Custom entity update endpoint address #79

Closed SamShekhovtsov closed 10 months ago

SamShekhovtsov commented 1 year ago

Is this possible to add ability to specify a custom action address when updating entities? I think, that it would be really useful.

For example, there is an entity User I want to send a PUT request to change the user password.

In that case, the request would look like:

PUT /users -> to update the entire user entity
PUT users/passwordchange -> to change the password only
diegomvh commented 1 year ago

Hi @SamShekhovtsov I think for that kind of functionality the OData standard provides actions. If you create an action bound to the user entity in the backend and then use the code generator, the action maps to a function in the generated angular services