Skip to content

[http-client] Add client paging typekit #7615

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 6 commits into from
Closed

[http-client] Add client paging typekit #7615

wants to merge 6 commits into from

Conversation

tadelesh
Copy link
Member

Move the paging metadata calculation logic from TCGC to http-client.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR moves the paging metadata calculation logic from TCGC to the http-client package and introduces a new client paging typekit. Key changes include:

  • Adding a new getPagingClientMetadata method and helper functions (getContinuationTokenSegments, getNextLinkSegments, etc.) in operation.ts.
  • Extending the SdkModelPropertyKit in model-property.ts with a getRootSourceProperty utility.
  • Updating getPlausibleName signatures and exporting the new ClientExtensionOptions in index.ts.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/http-client/src/typekit/kits/operation.ts Adds paging metadata calculation functions and helper functions for client paging operations.
packages/http-client/src/typekit/kits/model-property.ts Introduces getRootSourceProperty to retrieve the root source for a model property.
packages/http-client/src/typekit/kits/index.ts Exports a new ClientExtensionOptions interface for client extensions.
packages/compiler/src/typekit/utils/get-plausible-name.ts Extends getPlausibleName to accept ModelProperty.
packages/compiler/src/typekit/kits/type.ts Updates getPlausibleName signature to support ModelProperty.
Comments suppressed due to low confidence (1)

packages/http-client/src/typekit/kits/operation.ts:157

  • [nitpick] The variable name 'x' is ambiguous. Consider renaming it to a more descriptive identifier, such as 'pagingClientMetadata', to improve clarity.
const x: ClientOperationPagingMetadata = {

Copy link
Contributor

❌ There is undocummented changes. Run chronus add to add a changeset or click here.

The following packages have changes but are not documented.

  • @typespec/compiler
  • @typespec/http-client
Show changes

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

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.

3 participants