Add test scenario for relative nextLink URLs in pagination#3922
Merged
JoshLove-msft merged 4 commits intomainfrom Feb 11, 2026
Merged
Add test scenario for relative nextLink URLs in pagination#3922JoshLove-msft merged 4 commits intomainfrom
JoshLove-msft merged 4 commits intomainfrom
Conversation
Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add spector scenario for relative nextlink
Add test scenario for relative nextLink URLs in pagination
Feb 10, 2026
commit: |
lmazuel
approved these changes
Feb 10, 2026
Member
lmazuel
left a comment
There was a problem hiding this comment.
I'm not an expert in writing scenario tests, but conceptually this looks all good
Collaborator
|
All changed packages have been documented.
Show changes
|
Collaborator
|
You can try these changes here
|
14 tasks
This was referenced Feb 11, 2026
github-merge-queue bot
pushed a commit
to microsoft/typespec
that referenced
this pull request
Feb 13, 2026
…tLink scenario (#9685) Adds Python SDK test coverage for the new `Azure_Core_Page_withRelativeNextLink` Spector scenario from [Azure/typespec-azure#3922](Azure/typespec-azure#3922), which tests pagination with relative nextLink URLs that clients must resolve against the service endpoint. - **Dependency bump**: `@azure-tools/azure-http-specs` → `0.1.0-alpha.38-dev.2` to pick up the new scenario - **Sync test**: `test_list_with_relative_next_link` in `test_azure_core_page.py` - **Async test**: `test_list_with_relative_next_link` in `test_azure_core_page_async.py` - **Changelog**: internal change entry for `@typespec/http-client-python` Both tests paginate across two pages and assert `id`, `name`, and `etag` for each returned `User`: ```python def test_list_with_relative_next_link(client: PageClient): result = list(client.with_relative_next_link()) assert len(result) == 2 assert result[0].id == 1 assert result[0].name == "User1" assert result[1].id == 2 assert result[1].name == "User2" ``` > [!WARNING] > > <details> > <summary>Firewall rules blocked me from connecting to one or more addresses (expand for details)</summary> > > #### I tried to connect to the following addresses, but was blocked by firewall rules: > > - `https://api.github.com/repos/Azure/typespec-azure/pulls/3922` > - Triggering command: `/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js` (http block) > > If you need me to access, download, or install something from one of these locations, you can either: > > - Configure [Actions setup steps](https://gh.io/copilot/actions-setup-steps) to set up my environment, which run before the firewall is enabled > - Add the appropriate URLs or hosts to the custom allowlist in this repository's [Copilot coding agent settings](https://github.com/microsoft/typespec/settings/copilot/coding_agent) (admins only) > > </details> <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
7 tasks
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.
Some Azure services return relative URLs in pagination
nextLinkfields instead of absolute URLs. Clients must resolve these against the service endpoint.Changes
Azure_Core_Page_withRelativeNextLinkinazure/core/pagenextLinkis a relative pathGET /azure/core/page/with-relative-next-linkTechnical Detail
Mock API returns relative URL without base URL injection:
Clients must prepend the service endpoint to relative URLs when following pagination.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.