Skip to content

Pagination support must not be generated unless all conditions are met #1017

@noahdietz

Description

@noahdietz

Based on the contents of https://google.aip.dev/client-libraries/4233, pagination support should only be added to a GAPIC method iff the following criteria are met:

Pagination can be inferred for an RPC when all of the following conditions are met:

* The request message contains an int32 page_size field.
* The request message contains a string page_token field.
* The response message contains a string next_page_token field.
* The response message contains one non-primitive repeated field.

Based on a recent report referencing http://cl/460633538, the Java generator is attempting to generate Pagination support even when the final item on that list is not fulfilled The response message contains one non-primitive repeated field. The response message in question FetchInventoryResponse does not have a repeated field, and even though it has the other pagination support fields.

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions