mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +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 $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getMethod()
|
||||||
|
{
|
||||||
|
return $this->method;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
|
@ -282,7 +282,7 @@ class ApiDocExtractor
|
|||||||
$parameters = $this->clearClasses($parameters);
|
$parameters = $this->clearClasses($parameters);
|
||||||
$parameters = $this->generateHumanReadableTypes($parameters);
|
$parameters = $this->generateHumanReadableTypes($parameters);
|
||||||
|
|
||||||
if ('PUT' === $method) {
|
if ('PUT' === $annotation->getMethod()) {
|
||||||
// All parameters are optional with PUT (update)
|
// All parameters are optional with PUT (update)
|
||||||
array_walk($parameters, function ($val, $key) use (&$data) {
|
array_walk($parameters, function ($val, $key) use (&$data) {
|
||||||
$parameters[$key]['required'] = false;
|
$parameters[$key]['required'] = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user