Skip to content

Consider using a repeated string field as the paginated item by default #4708

@suzmue

Description

@suzmue

Originally from @dbolduc in #4687 (comment):

FWIW, in C++ we said if there was only a repeated string field, use that as the paginated item:

https://github.com/googleapis/google-cloud-cpp/blob/6a4b2fb26e51a9af7c8521e596806b9c563a9ee9/generator/internal/pagination.cc#L87-L93

That strategy has a failure mode. If we pick some string field at first, then a repeated message field is later added to the API, the paginated type switches, breaking the API. Seems super unlikely though.

Might be worth checking if there are other APIs we can fix, or if Pub/Sub is the only one at issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions