-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vibe.web.web: Allow Json as a auto-injected parameter type #1853
base: master
Are you sure you want to change the base?
Conversation
Instead of giving
That would also mean that When that works, This is of course a bit more to type and the question is if frequency wins over clarity of intent here. If it should turn out that it does, then we should at least restrict this to parameters named |
As you might have guessed, I am not a huge fan of struct MyInputObject {
string p1, p2, p3;
@optional Nullable!int i;
}
void foo(MyInputObject input) over picking out some attributes manually: @bodyParam("p1")
@bodyParam("p2")
@bodyParam("p3")
@bodyParam("i")
void (string p1, string p2, string p3, Nullable!int i = Nullable!int.init) In practice there are much more attributes, of course. void foo() {
if (auto tok = "adminToken" in req.query) {
... Whereas with
Btw currently
Well, I maintain a small fork of
Would be fine for me. |
Done (used FWIW there are already a lot of special cases:
The point of this PR was that the someone has a Btw we could also - similarly to |
-> #1945 |
7039cb0
to
e44ffef
Compare
Rebased to trigger the CI systems.
This is the case since some time. @s-ludwig anything else blocking this? |
Split-off from #1697
Now that
req.json
is lazy, this shouldn't be blocked anymore :)