Merge pull request #1259 from simonbertonsugasti/patch-1

Update UPGRADE-3.0.md
This commit is contained in:
Guilhem N 2018-03-21 13:25:40 +01:00 committed by GitHub
commit f9e28db38b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,7 +165,12 @@ class SwaggerDocblockConvertCommand extends ContainerAwareCommand
$docstart = strrpos(substr($code, 0, $position), '@ApiDoc');
if (false === $docstart) {
throw new \RuntimeException("Method $methodName has no @ApiDoc annotation around\n".substr($code, $position - 200, 150));
//If action is defined more than once. Should continue and don't throw exception
$docstart = strrpos(substr($code, 0, $position), '@Operation');
if (false === $docstart) {
throw new \RuntimeException("Method $methodName has no @ApiDoc annotation around\n".substr($code, $position - 200, 150));
}
}
$docend = strpos($code, '* )', $docstart) + 3;