diff --git a/Describer/SwaggerPhpDescriber.php b/Describer/SwaggerPhpDescriber.php index 64b44a7..608d10b 100644 --- a/Describer/SwaggerPhpDescriber.php +++ b/Describer/SwaggerPhpDescriber.php @@ -206,6 +206,7 @@ final class SwaggerPhpDescriber implements ModelRegistryAwareInterface $path = $this->normalizePath($route->getPath()); $httpMethods = $route->getMethods() ?: Swagger::$METHODS; $httpMethods = array_map('strtolower', $httpMethods); + $httpMethods = array_intersect($httpMethods, Swagger::$METHODS); yield $method => [$path, $httpMethods]; }