diff --git a/generate_api_from_protos.php b/generate_api_from_protos.php index 57115c0..2ef20c6 100644 --- a/generate_api_from_protos.php +++ b/generate_api_from_protos.php @@ -178,7 +178,7 @@ function ParseTypeToRequestParameters( string $request, string $proto, int $leve $service = substr( $proto, $matches[ $i - 1 ][ 1 ][ 1 ], $matches[ $i ][ 1 ][ 1 ] - $matches[ $i - 1 ][ 1 ][ 1 ] ); - preg_match_all( "/rpc (.+?) \(.(.+?)\) returns \(.(?:.+?)\)\s*(?:;|\{\s*option \(method_description\) = \"(.+?)\";)$/m", $service, $rpcs ); + preg_match_all( "/rpc (.+?) \(\.?(.+?)\) returns \(\.?(?:.+?)\)\s*(?:;|{}|\{\s*option \(method_description\) = \"(.+?)\";)$/m", $service, $rpcs ); $generatedMethods = [];