Skip to content

Conversation

weidongxu-microsoft
Copy link
Contributor

@weidongxu-microsoft weidongxu-microsoft commented Sep 29, 2025

case in storage-blob
https://github.com/Azure/azure-rest-api-specs/blob/82057ab083fe06e1e1584e8c846af87cf8237a58/specification/storage/Microsoft.BlobStorage/models.tsp#L222-L231

However there seems to be other bugs on azurev2, when running on my local.


This fixes some issue, but not all of them, in azurev2.

@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:java Issue for the Java client emitter: @typespec/http-client-java label Sep 29, 2025
Copy link
Contributor

No changes needing a change description found.

@azure-sdk
Copy link
Collaborator

azure-sdk commented Sep 29, 2025

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

let continuationTokenResponseProperty: Property[] | undefined;
let continuationTokenResponseHeader: HttpHeader | undefined;
if (!this.isBranded()) {
if (!this.isAzureV1()) {
Copy link
Contributor Author

@weidongxu-microsoft weidongxu-microsoft Sep 29, 2025

Choose a reason for hiding this comment

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

azurev2 can have same generated code, as unbranded

const schemaName = groupToRequestConditions ? "RequestConditions" : "MatchConditions";
let schemaName = groupToRequestConditions ? "RequestConditions" : "MatchConditions";
if (!this.isBranded()) {
schemaName = "Http" + schemaName;
Copy link
Contributor Author

@weidongxu-microsoft weidongxu-microsoft Sep 29, 2025

Choose a reason for hiding this comment

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

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

Enables continuation token support for Azure V2 client generation while improving request conditions naming for unbranded clients. The PR addresses limitations in the HTTP client Java emitter for paginated APIs.

  • Enables continuation token functionality for Azure V2 clients (not just unbranded)
  • Adds validation to warn when nested page items are used with Azure V1
  • Fixes request conditions schema naming for unbranded clients by prefixing with "Http"

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/http-client-java/emitter/src/lib.ts Adds new diagnostic message for nested page items unsupported in Azure V1
packages/http-client-java/emitter/src/code-model-builder.ts Updates logic to support continuation tokens in Azure V2, adds validation for nested page items, and fixes schema naming for unbranded clients

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:client:java Issue for the Java client emitter: @typespec/http-client-java
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants