Skip to content

Add test scenario for paging without nextlink/continuationToken #7493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented May 28, 2025

This PR adds a test scenario for a paging operation that doesn't use either nextLink or continuationToken.

The TypeSpec HTTP library allows operations to be marked with @list decorator and only requires that a property in the return model has the @pageItems decorator. However, there was no test scenario to verify that this works correctly without a nextlink or continuationToken property.

Changes made:

  • Added a new test scenario noPagination in packages/http-specs/specs/payload/pageable/main.tsp that demonstrates a valid paging operation without pagination tokens
  • Implemented the corresponding mock API in packages/http-specs/specs/payload/pageable/mockapi.ts
  • Added a changeset to document this feature addition

Code changes are minimal and follow the pattern of existing test scenarios in the codebase.

Fixes #6732.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: iscai-msft <43154838+iscai-msft@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Need Spector scenario for paging without nextlink/continuationToken Add test scenario for paging without nextlink/continuationToken May 28, 2025
@Copilot Copilot AI requested a review from iscai-msft May 28, 2025 14:35
Copilot finished work on behalf of iscai-msft May 28, 2025 14:35
@timotheeguerin
Copy link
Member

/azp run typespec - pr tools

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@@ -57,6 +57,27 @@ namespace ServerDrivenPagination {

@nextLink next?: url;
};

Copy link
Contributor

Choose a reason for hiding this comment

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

@iscai-msft iscai-msft closed this Jun 16, 2025
@iscai-msft iscai-msft deleted the copilot/fix-6732 branch June 16, 2025 19:49
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

Error loading sessions

Retrying...

Successfully merging this pull request may close these issues.

Need Spector scenario for paging without nextlink/continuationToken
5 participants