Args not processed properly

nicholasThompson - November 9, 2009 - 00:08
Project:Services
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:by design
Description

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...

AttachmentSize
services.arg-keys.patch809 bytes

#1

Hugo Wetterberg - November 25, 2009 - 15:50
Status:needs review» by design

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

 
 

Drupal is a registered trademark of Dries Buytaert.