On 2016-02-17 16:54, John More wrote:
Jacob,
Thank you for your quick response.I was able to get it working correctly but discovered some anomalies along the way; that, I am sure if pursued would lead me into the depths of the framework where a mere mortal as I should fear to tread.
The addUserId(userData ud) would not work with any form of path "/userId, /userid, /user". What did work was addUserid(userData ud) with a path of "/userid".
After finding your documentation reference I looked at the
URLRouter registerRestInterface(TImpl)(
URLRouter router,
TImpl instance,
RestInterfaceSettings settings = null
);
and in particular the settings.methodStyle where I think the default is likely to be lowerCase.
Seems I forgot to include the link for the documentation :)
I think the default method style is "lowerUnderscored" [1]. That would
mean "addUserId" would be mapped to "/user_id", unless it has some
special treatment of "id".
Unfortunately figuring out how to set this on the call is beyond me at this point but I do have it working.
I think you set it something like this:
auto settings = new RestInterfaceSettings;
settings.methodStyle = MethodStyle.lowerUnderscored; // or whatever
style you prefer [2]
auto router = new URLRouter;
router.registerRestInterface(new NoteStoreImplementation, settings);
[1] http://vibed.org/api/vibe.web.common/MethodStyle.lowerUnderscored
[2] http://vibed.org/api/vibe.web.common/MethodStyle
/Jacob Carlborg