Repository navigation
[http-client-java] Support continuation-token paging in Azure V1 - #12196
Merged
Weidong Xu (weidongxu-microsoft) merged 7 commits intoOct 16, 2026
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4bbe3fb2-95f1-4311-8050-62ba7dba4860
Contributor
|
All changed packages have been documented.
Show changes
|
|
You can try these changes here
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4bbe3fb2-95f1-4311-8050-62ba7dba4860
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4bbe3fb2-95f1-4311-8050-62ba7dba4860
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Generated-code compilation failures and growing per-page callback chains remain unresolved.
3 open findings
What changed in this PR
Adds continuation-token paging to Azure V1 Java clients, integrating automatic page retrieval and resumption with existing paging APIs.
Changes:
- Preserves token metadata and propagates response tokens into subsequent requests.
- Hides tokens from public signatures and delegation calls.
- Adds emitter, generator, and paging tests, including XML scenarios.
| File | Description |
|---|---|
| packages/http-client-java/generator/http-client-generator-test/src/test/java/payload/pageable/PageableTests.java | Tests traversal, resumption, options reuse, and XML. |
| packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/XmlPaginationClient.java | Removes explicit token overload. |
| packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/XmlPaginationAsyncClient.java | Removes explicit async token overload. |
| packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/ServerDrivenPaginationContinuationTokenClient.java | Hides tokens in synchronous APIs. |
| packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/ServerDrivenPaginationContinuationTokenAsyncClient.java | Hides tokens in asynchronous APIs. |
| packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/implementation/XmlPaginationsImpl.java | Implements XML token paging. |
| packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/implementation/ServerDrivenPaginationContinuationTokensImpl.java | Implements query/header token paging. |
| packages/http-client-java/generator/http-client-generator-core/src/test/java/com/microsoft/typespec/http/client/generator/core/template/ContinuationTokenPagingTests.java | Tests paging templates and delegation. |
| packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/template/WrapperClientMethodTemplate.java | Filters hidden parameters from wrappers. |
| packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/template/ServiceSyncClientWrapAsyncClientTemplate.java | Filters sync-over-async delegation arguments. |
| packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/template/ConvenienceSyncMethodTemplate.java | Filters convenience delegation arguments. |
| packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/template/ConvenienceMethodTemplateBase.java | Omits hidden protocol arguments. |
| packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/template/ClientMethodTemplateBase.java | Hides tokens in generated documentation. |
| packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/template/ClientMethodTemplate.java | Generates token extraction and page callbacks. |
| packages/http-client-java/emitter/test/fixtures/continuation-token.tsp | Defines token-placement test scenarios. |
| packages/http-client-java/emitter/test/code-model.test.ts | Verifies metadata across client flavors. |
| packages/http-client-java/emitter/src/code-model-builder.ts | Enables Azure V1 token metadata. |
| .github/instructions/http-client-java.instructions.md | Documents README regeneration workflow. |
| .chronus/changes/http-client-java-azure-continuation-token.md | Announces paging support and resumption. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Avoid token lambda name collisions and preserve typed token forwarding for Context-based clients. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4bbe3fb2-95f1-4311-8050-62ba7dba4860
Weidong Xu (weidongxu-microsoft)
marked this pull request as ready for review
October 15, 2026 05:38
Prefer next-link metadata over continuation tokens, replace exact paging arguments, and allocate paging callback locals against enclosing parameters. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4bbe3fb2-95f1-4311-8050-62ba7dba4860
Preserve XML attribute and namespace metadata when extracting paging tokens, including attributes on root and nested elements. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4bbe3fb2-95f1-4311-8050-62ba7dba4860
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4bbe3fb2-95f1-4311-8050-62ba7dba4860
Xiaofei Cao (XiaofeiCao)
approved these changes
Oct 15, 2026
Weidong Xu (weidongxu-microsoft)
deleted the
feature/java-azure-continuation-token
branch
October 16, 2026 02:40
Weidong Xu (weidongxu-microsoft)
added a commit
to Azure/typespec-azure
that referenced
this pull request
Oct 16, 2026
…5745) Update the Java core pin to `f098e0fdd` for the `0.48.2` hotfix. No package version bump in this PR. - Include continuation-token paging (microsoft/typespec#12196), enum Javadoc escaping (microsoft/typespec#12177), and dependency synchronization (microsoft/typespec#12286), plus upstream dependency maintenance (microsoft/typespec#12205, microsoft/typespec#12207, microsoft/typespec#12287). - Sync upstream integration tests and add a local version-sync script for shared test dependencies/plugins, using the pinned upstream POMs. Preserve Azure-specific tooling and generated samples. - Record all changes as Chronus `fix`, as requested for this release branch. Validation: branded emitter/generator build, offline version-sync tests, enum/ARM generation smoke checks, repository formatting and lint. Copilot-Session: c93fd771-4af9-4e61-b9af-8f2b15588c47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
has_morehandling is out of scope; pagination ends when the response token is absent.Validation