Fixed checking HTTP method type

This commit is contained in:
lucasvanlierop 2014-09-29 16:17:36 +02:00
parent 6bcd5e8d81
commit eaaa54bf11
2 changed files with 9 additions and 1 deletions

View File

@ -579,6 +579,14 @@ class ApiDoc
return $this;
}
/**
* @return string
*/
public function getMethod()
{
return $this->method;
}
/**
* @return array
*/

View File

@ -282,7 +282,7 @@ class ApiDocExtractor
$parameters = $this->clearClasses($parameters);
$parameters = $this->generateHumanReadableTypes($parameters);
if ('PUT' === $method) {
if ('PUT' === $annotation->getMethod()) {
// All parameters are optional with PUT (update)
array_walk($parameters, function ($val, $key) use (&$data) {
$parameters[$key]['required'] = false;