in Swagger.php, use dirname instead of grepping for slash, which could be / or \