On Tue, 02 Oct 2012 14:01:06 +0200, Sönke Ludwig wrote:

Am 10/2/2012 1:50 PM, schrieb mist:

Does router for REST interfaces support overloaded methods interface? I
was about to finish a patch that fixes this issue regarding automatic
client generation, when suddenly understood that I have actually no idea
if is supposed to work at all :) No 100% confidence from reading
sources, need a dev comment.

Not yet, although I always wanted to support that... The problems with
this begin with DMD though. It really needs some better reflection
capabilities, starting with traits(getParameterNames) and
traits(getParameterDefaultValues).

But the main problem is expressing types that are not known inside
vibe.http.rest in the generated string mixin. I'm currently using a hack
that fails as soon as a method has multiple overloads...

Well, ye, I have found that when was exploring client generation and I think a have a fix for that. It involves custom fullyQualifiedTypename template for non-functions and local import of module interface was defined in. I was just about to write docs/tests for it and make a proof-of-concept pull request when question about router has arisen.

I think I can try to pull this of with some help regarding questions about router and overall design. "getParameterNames" feels like a pain, but should be doable at least for specific required cases.