Skip to content

fix(swift): add pagination overloads to service protocol#5993

Merged
chingor13 merged 3 commits into
mainfrom
swift-pagination-protocol
May 14, 2026
Merged

fix(swift): add pagination overloads to service protocol#5993
chingor13 merged 3 commits into
mainfrom
swift-pagination-protocol

Conversation

@chingor13
Copy link
Copy Markdown
Contributor

The paginated overloads for RPCs should be included in the service's protocol functions.

Note: a protocol return type within a protocol MUST be any because there is no way for the compiler to infer the return type. This also means that the implementation cannot specify some because it does not match the function signature.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Swift mustache templates to use 'any AsyncSequence' instead of 'some AsyncSequence' for pagination method signatures. It also modifies the service protocol template to conditionally include pagination and pagination-options method signatures, including their documentation lines, within the REST method definitions. I have no feedback to provide.

@chingor13 chingor13 marked this pull request as ready for review May 13, 2026 23:18
@chingor13 chingor13 requested a review from a team as a code owner May 13, 2026 23:18
Copy link
Copy Markdown
Contributor

@coryan coryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@chingor13 chingor13 merged commit 26157b9 into main May 14, 2026
45 of 46 checks passed
@chingor13 chingor13 deleted the swift-pagination-protocol branch May 14, 2026 13:33
sofisl pushed a commit that referenced this pull request May 14, 2026
The paginated overloads for RPCs should be included in the service's
protocol functions.

Note: a protocol return type within a protocol MUST be `any` because
there is no way for the compiler to infer the return type. This also
means that the implementation cannot specify `some` because it does not
match the function signature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants