guzzle/guzzle — pull request #298 by lapause (2013-04-15 13:56:06+00:00)
Title: Bugfix: Parameter names setup

Parameter names are left _null_ when at root level or referencing another model.

Sample code:

array(
"date" => array(
"type" => "string",
"pattern" => "[0-9]{4}-[0-9]{2}-[0-9]{2}",
"description" => _e("ISO 8601 date")
),
"User" => array(
"type" => "object",
"properties" => array(
"dob" => array('$ref' => "date")
)
)
)
);
$sd = Guzzle\Service\Description\ServiceDescription::factory($desc);
var_dump($sd->getModel("date")->getName());
var_dump($sd->getModel("User")->getProperty("dob")->getName());
die();

The sample above should display "date" and "dob", instead than _null_ and _null_.

The 2 submitted commits ensure that if no specific name is set, the parameter key is used.