-
Notifications
You must be signed in to change notification settings - Fork 69
Description
For each paginated method GAPIC clients also provide a raw version of it, without GAPIC pagination machinery enabled. The inline code samples for such methods always assume that there is a repeated field named "responses`, while the repeated field may be given any field (paginated response must have only one repeated field by convention, but that repeated field may have any name).
For example in vision/v1/ProductSearchClient.java#L675:
Instad of:
for (ProductSet element : response.getResponsesList()) {It should be:
for (ProductSet element : response.getProductSetsList()) {Because the corresponding paginated field in the proto definition is called product_sets
Currently the samples assume response.getResponsesList() for all gapics regardless of how the field is actually called in each specific API.
The same stuff but in gapic-generator-java goldens:
EchoClient.golden#L526
echo.proto#L237
Notice, in gapic-generator-java tests the paginated field is actually called responses, coincidentally leading to a correct result (hard-coded value matches actual value).