So far based on Guzzle Doc here is what i have been able to come up with, but when logging the request the locations parameter is an array of empty object.
'parameters' => array(
'id' => array(
'location' => 'json',
'type' => 'integer',
'required' => true,
),
'product_code' => array(
'location' => 'json',
'type' => 'string',
'required' => true,
),
'name' => array(
'description' => 'vacuum cleaner',
'location' => 'json',
'type' => 'string',
'required' => true,
),
'locations' => array(
'location' => 'json',
'type' => 'array',
'required' => true,
"items" => array(
"type" => "object",
"properties" => array(
"retailer_id" => array(
"location" => "json",
"type" => "integer"
),
"stock" => array(
"location" => "json",
"type" => "integert"
)
)
)
),
),
),