feat: add gapic options as inputs to generate_library.sh#2121
feat: add gapic options as inputs to generate_library.sh#2121JoeWang1127 merged 12 commits intomainfrom
generate_library.sh#2121Conversation
|
Tested the PR in the following libraries: |
diegomarquezp
left a comment
There was a problem hiding this comment.
Thanks for putting this together. Just a couple comments.
I think we can expand proto_path_list.txt to include at least one library per case that is fixed by this PR
| if [ -f "${file_path}/${gapic_option}" ]; then | ||
| gapic_option="${file_path}/${gapic_option}" | ||
| else | ||
| gapic_option="" |
There was a problem hiding this comment.
Does this mean that the BUILD file may reference a non-existent yaml or json file? If not defaulting to an error, would it make sense to produce a warning to stderr to explain that the specified file by the BUILD file was not found and will just use the default empty string?
There was a problem hiding this comment.
I didn't find a case to use a non-existent file.
I'll add a warning in such case.
library_generation/utilities.sh
Outdated
| fi | ||
| echo "transport=${transport},${rest_numeric_enums}grpc-service-config=${grpc_service_config},${gapic_config}api-service-config=${api_service_config}" | ||
| gapic_yaml="gapic-config=${gapic_yaml}," | ||
| echo "transport=${transport},${rest_numeric_enums}grpc-service-config=${grpc_service_config},${gapic_yaml}api-service-config=${service_yaml}" |
There was a problem hiding this comment.
| echo "transport=${transport},${rest_numeric_enums}grpc-service-config=${grpc_service_config},${gapic_yaml}api-service-config=${service_yaml}" | |
| echo "transport=${transport},rest_numeric_enums=${rest_numeric_enums},service-config=${grpc_service_config},gapic_yaml=${gapic_yaml},service-yaml=${service_yaml}" |
There was a problem hiding this comment.
Done.
rest_numeric_enums is not like other gapic options, where key and value separated by "=". When set to false, it can't present in the argument, otherwise the generator will treat it as true.
|
[gapic-generator-java-root] Kudos, SonarCloud Quality Gate passed! |
|
[java_showcase_integration_tests] Kudos, SonarCloud Quality Gate passed! |








In this PR:
generate_library.sh: