mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-03-12 02:26:09 +03:00
Update UPGRADE-3.0.md
Added an if that fixes action routes defined more than once. That route is already changed to the new documentation and should throw an error if that happened.
This commit is contained in:
parent
981a2b6293
commit
cd4f54220e
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user