-
Notifications
You must be signed in to change notification settings - Fork 245
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
[python] support continuation token for paging #6242
base: main
Are you sure you want to change the base?
Conversation
…hon-tcgc-0.51.3
…hon-tcgc-0.51.3
All changed packages have been documented.
|
You can try these changes here
|
if (segments.length > 0 && segments[0].kind === "property") { | ||
const result = []; | ||
for (const segment of segments) { | ||
if (segment.kind === "property") { | ||
result.push(segment.serializationOptions.json?.name ?? ""); | ||
} | ||
} | ||
return result.join("."); | ||
} |
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.
if (segments.length > 0 && segments[0].kind === "property") { | |
const result = []; | |
for (const segment of segments) { | |
if (segment.kind === "property") { | |
result.push(segment.serializationOptions.json?.name ?? ""); | |
} | |
} | |
return result.join("."); | |
} | |
if (segments[0]?.kind === "property") { | |
return segments.filter(s=>s.kind === "property").map(s=>s.serializationOptions.json?.name ?? "").join("."); | |
} |
if self.is_continuation_token: | ||
return f"{self.client_name} if _next_token is _Unset else _next_token" |
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.
if we do not need _Unset
as i mentioned in the generated code change pr, then we do not need this is_continuation_token
, right?
fix #5791
API design: https://gist.github.com/msyyc/02463a6dc5a150772bd8f0ae42d4cd37
Summary for this PR:
isContinuationToken
in parameterContinuationTokenRequest/ContinuationTokenResponse
for paging operation whose type is{wireName: string, position: "header" | "query" | "body"}
isContinuationToken
/ContinuationTokenRequest/ContinuationTokenResponse
, it is much easier for pygen to generate related APIcontinuationTokenName
which is actually used as withnextLinkName
withnextLinkName