googleapis / googleapis/google-cloud-java

[maps]: Java gRPC Protobuf schemas for Text Search are missing pagination request and response fields

Đang mở
#11,901 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
priority: p3 type: feature request
Ngôn ngữ chính
Java
Star
2.1k
Fork
1.2k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
157

Mô tả

### Summary
The Protobuf schemas exposed by the Java gRPC SDK for **Text Search (New)** do not fully match the official Places API documentation. Pagination-related fields are missing both in `SearchTextRequest` and `SearchTextResponse`, preventing proper pagination support.

### Actual behavior

#### Request
In the Java gRPC Protobuf definition of `SearchTextRequest`, the only available field to limit results is:

```java
SearchTextRequest request = SearchTextRequest.newBuilder()
.setTextQuery("restaurant")
.setMaxResultCount(20)
.build();
```

- `max_result_count` is the only exposed mechanism
- This field is deprecated according to the documentation
- `page_size` and `page_token` are not available in the Protobuf schema

#### Response
`SearchTextResponse` does **not expose `next_page_token`**, making it impossible to retrieve subsequent pages even if pagination were supported on the request side.

### Expected behavior

#### Request
According to the official Places API documentation, pagination should be implemented using `page_size` and `page_token`.

The Protobuf schema should allow usage such as:

```java
SearchTextRequest request = SearchTextRequest.newBuilder()
.setTextQuery("restaurant")
.setPageSize(20)
.setPageToken(pageToken)
.build();
```

#### Response
`SearchTextResponse` should expose `next_page_token` to allow fetching the next page of results:

```java
SearchTextResponse response = placesClient.searchText(request);
String nextPageToken = response.getNextPageToken();
```

### References
- `SearchTextRequest`: https://developers.google.com/maps/documentation/places/web-service/reference/rpc/google.maps.places.v1#searchtextrequest

- `SearchTextResponse`: https://developers.google.com/maps/documentation/places/web-service/reference/rpc/google.maps.places.v1#searchtextresponse

Image

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.