Ignore path without valid methods

This commit is contained in:
Floran Brutel 2018-04-19 09:51:52 +02:00
parent 7aa4c829b7
commit eb7e6b6803
No known key found for this signature in database
GPG Key ID: 5F489E97DDFCBEBC

View File

@ -208,6 +208,10 @@ final class SwaggerPhpDescriber implements ModelRegistryAwareInterface
$httpMethods = array_map('strtolower', $httpMethods);
$httpMethods = array_intersect($httpMethods, Swagger::$METHODS);
if (empty($httpMethods)) {
continue;
}
yield $method => [$path, $httpMethods];
}
}