Skip to content

Commit

Permalink
Fixed issue nelmio#565
Browse files Browse the repository at this point in the history
  • Loading branch information
hgiesenow committed Jun 24, 2015
1 parent 7c8b010 commit 72ab9b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Extractor/ApiDocExtractor.php
Expand Up @@ -309,8 +309,8 @@ protected function extractData(ApiDoc $annotation, Route $route, \ReflectionMeth
$parameters = $this->clearClasses($parameters);
$parameters = $this->generateHumanReadableTypes($parameters);

if ('PUT' === $annotation->getMethod()) {
// All parameters are optional with PUT (update)
if ('PATCH' === $annotation->getMethod()) {
// All parameters are optional with PATCH (update)
array_walk($parameters, function ($val, $key) use (&$parameters) {
$parameters[$key]['required'] = false;
});
Expand Down

0 comments on commit 72ab9b9

Please sign in to comment.