api icon indicating copy to clipboard operation
api copied to clipboard

feat: add continuation_token to ListObjects request and response

Open KTS-o7 opened this issue 3 weeks ago β€’ 3 comments

Add continuation_token field to enable resumable pagination for the ListObjects API. This allows clients to retrieve all accessible objects even when results are truncated due to deadline or max results limits.

Changes:

  • ListObjectsRequest: add continuation_token field (field 9)
  • ListObjectsResponse: add continuation_token field (field 2)
  • Regenerate Go code and OpenAPI docs

This change works in conjunction with server-side changes in openfga/openfga that implement the pagination logic using gzip-compressed tokens containing previously returned object IDs for deduplication.

Relates to: openfga/openfga#2828

Description

What problem is being solved?

How is it being solved?

What changes are made to solve it?

References

Review Checklist

  • [x] I have clicked on "allow edits by maintainers".
  • [ ] I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • [x] The correct base branch is being used, if not main
  • [ ] I have added tests to validate that the change in functionality is working as expected

Summary by CodeRabbit

Release Notes

  • New Features
    • Added pagination continuation support for list operations. API responses now include continuation tokens that enable clients to resume paginated results from previous calls. Tokens are opaque strings that remain empty when all results have been returned, allowing efficient iteration through large datasets.

✏️ Tip: You can customize this high-level summary in your review settings.

KTS-o7 avatar Nov 26 '25 09:11 KTS-o7

CLA Not Signed

Walkthrough

Pagination continuation support has been added to the OpenFGA service by introducing continuation_token fields to ListObjectsRequest and ListObjectsResponse messages in the proto definition. Corresponding OpenAPI/Swagger documentation and validation file entries have been updated to reflect these changes.

Changes

Cohort / File(s) Summary
Proto Service Definition
openfga/v1/openfga_service.proto
Added continuation_token (string, field 9) to ListObjectsRequest and continuation_token (string, field 2) to ListObjectsResponse with json_name annotations and OpenAPI descriptions for pagination support
OpenAPI/Swagger Documentation
docs/openapiv2/apidocs.swagger.json
Added continuation_token property (type: string) to ListStoresResponse, ListObjectsResponse, and the POST /stores/{store_id}/list-objects request body schema to document pagination token support
Proto Validation
proto/openfga/v1/openfga_service.pb.validate.go
Added documentation comments noting no validation rules for continuation_token in ListObjectsRequest.validate and ListObjectsResponse.validate

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Homogeneous changes: same field addition (continuation_token) repeated across request/response message definitions
  • No logic or control flow modifications; purely data model additions
  • OpenAPI documentation changes are straightforward mirrors of proto definitions
  • Validation file updates are comment-only additions with no functional impact

Possibly related issues

  • openfga/openfga#2828: Directly addresses pagination support by adding continuation_token fields to ListObjects request/response protobufs and documentation, matching the objectives of this PR exactly.

Pre-merge checks and finishing touches

βœ… Passed checks (3 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check βœ… Passed The title accurately describes the main change: adding continuation_token fields to ListObjects request and response for pagination support.
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • [ ] πŸ“ Generate docstrings
πŸ§ͺ Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

[!TIP]

πŸ“ Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests β€” including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. πŸ“ Description β€” Summarize the main change in 50–60 words, explaining what was done.
  2. πŸ““ References β€” List relevant issues, discussions, documentation, or related PRs.
  3. πŸ“¦ Dependencies & Requirements β€” Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. πŸ“Š Contributor Summary β€” Include a Markdown table showing contributions: | Contributor | Lines Added | Lines Removed | Files Changed |
  5. βœ”οΈ Additional Notes β€” Add any extra reviewer context. Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Nov 26 '25 09:11 coderabbitai[bot]

Related Documentation

Checked 6 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?Β Β Join Discord

dosubot[bot] avatar Nov 26 '25 09:11 dosubot[bot]