mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
Fixed checking HTTP method type
This commit is contained in:
parent
6bcd5e8d81
commit
eaaa54bf11
@ -579,6 +579,14 @@ class ApiDoc
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getMethod()
|
||||
{
|
||||
return $this->method;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user