Implement Action "to" as Expressions of ressource rather than string
tjaskula opened this issue · 0 comments
tjaskula commented
Today in order to define ressource templates matching methods, URI and action we use strings everywhere like that
Action(6, "PUT", "/users/{userId}", "changeUser(string userId, body:Vlingo.Http.Tests.Sample.User.UserData userData)", "Vlingo.Http.Tests.Sample.User.UserDataMapper");
It would be much nicer instead of using magic string "changeUser(string userId, body:Vlingo.Http.Tests.Sample.User.UserData userData)"
to use the expression tree
(resource, userId, userData) => resource.ChangeUser(userId, userData)
We could also replace magic string "PUT"
by an enum