@@ -42,6 +42,10 @@ const argv = yargs
4242 . alias ( 'output-dir' , 'output_dir' )
4343 . describe ( 'gapic-validator_out' , 'Path to the output of the gapic validator' )
4444 . alias ( 'gapic-validator_out' , 'gapic_validator_out' )
45+ . describe (
46+ 'validation' ,
47+ 'Option to set the validation of proto files, default value is true'
48+ )
4549 . describe ( 'output_dir' , 'Path to a directory for the generated code' )
4650 . alias ( 'grpc-service-config' , 'grpc_service_config' )
4751 . describe ( 'grpc-service-config' , 'Path to gRPC service config JSON' )
@@ -76,6 +80,7 @@ const packageName = argv.packageName as string | undefined;
7680const mainServiceName = argv . mainService as string | undefined ;
7781const template = argv . template as string | undefined ;
7882const gapicValidatorOut = argv . gapicValidatorOut as string | undefined ;
83+ const validation = argv . validation as string | 'true' ;
7984const protoDirs : string [ ] = [ ] ;
8085if ( argv . I ) {
8186 protoDirs . push ( ...( argv . I as string [ ] ) ) ;
@@ -96,7 +101,7 @@ const protocCommand = [
96101 `--plugin=protoc-gen-typescript_gapic=${ protocPlugin } ` ,
97102 `--typescript_gapic_out=${ outputDir } ` ,
98103] ;
99- if ( gapicValidatorOut ) {
104+ if ( gapicValidatorOut && validation !== 'true' ) {
100105 protocCommand . push ( `--gapic-validator_out=${ gapicValidatorOut } ` ) ;
101106}
102107if ( grpcServiceConfig ) {
0 commit comments