On Wed, 03 Sep 2014 08:13:07 GMT, Yuriy wrote:
Ok, for now I've worked it around in the following way:
class GitlabAPI : RestInterfaceClient!IGitlabAPI { // Construction should go here... override Json request(string verb, string name, Json params, bool[string] param_is_json) const { foreach(k, v; param_is_json) if (k.endsWith('_')) { string newKey = k[0 .. $ - 1]; param_is_json[newKey] = param_is_json[k]; params[newKey] = params[k]; params.remove(k); } return super.request(verb, name, params, param_is_json); } }
The argument name should end in
_
, e.g.body_
. Would be cool to find out any easier approach. =)
This is now the default behavior as of f2ffc4b. RestInterfaceSettings.stripTrailingUnderscore = false;
can be used to get the old behavior.