I'm using the JSON Server with Services.

I noticed that, although method was being processed properly, it seems arguments for services were not. The fix seems to be that the $key is no longer user, rather the $arg['name'] should be used (when checking for optional keys).

Patch attached fixes the problem. I do not believe this is a JSON Service issue...

CommentFileSizeAuthor
services.arg-keys.patch809 bytesnicholasthompson

Comments

Hugo Wetterberg’s picture

Status: Needs review » Closed (works as designed)

This patch would change the current behaviour in services where arguments are mapped according to order rather than name. It's the responsibility of the server (JSON Server) to put the arguments in the correct order before passing them on to services.

This would break all or most other server implementations so it won't get into 2.x. But a discussion about whether services shouldn't switch to using named arguments in the future might be warranted.

Cheers
/Hugo