*     - source: Where this argument should be retrieved from. This can be
 *       'data' (indicating the POST data), 'param' (indicating the query
 *       string) or 'path' (indicating the url path). In the case of path,
 *       an additional parameter must be passed indicating the index to be used.

This doesn't match up with what I see in, say, the node update resource:

          'args' => array(
            array(
              'name' => 'nid',
              'optional' => FALSE,
              'source' => array('path' => 0),
              'type' => 'int',
              'description' => 'The nid of the node to get',
            ),
            array(
              'name' => 'node',
              'optional' => FALSE,
              'source' => 'data',
              'description' => 'The node data to update',
              'type' => 'array',
            ),
          ),

It looks like 'source' is:

- an array if 'path', of the form 'path' => INDEX
- an array if 'param', of the form 'param' => PARAMNAME
- a string if 'data'.

Comments

ygerasimov’s picture

Category: bug » task
Issue tags: +Novice

'data' can be either array or a string. Please propose a patch to improve documentation.

joachim’s picture

Category: task » bug

I'll see if I can find the time :)

(Resetting to bug report -- errors in documentation are a bug!)

kylebrowning’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

Fixed. thanks.