-
Notifications
You must be signed in to change notification settings - Fork 314
http-client-java, continuationToken can be used in azurev2 #8601
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
base: main
Are you sure you want to change the base?
http-client-java, continuationToken can be used in azurev2 #8601
Conversation
No changes needing a change description found. |
You can try these changes here
|
let continuationTokenResponseProperty: Property[] | undefined; | ||
let continuationTokenResponseHeader: HttpHeader | undefined; | ||
if (!this.isBranded()) { | ||
if (!this.isAzureV1()) { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they have different name in clientcore...
https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/clientcore/core/src/main/java/io/clientcore/core/http/models/HttpRequestConditions.java
There was a problem hiding this 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 |
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.