-
Notifications
You must be signed in to change notification settings - Fork 51
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
[doc] client code of paging operation #2269
base: main
Are you sure you want to change the base?
Conversation
No changes needing a change description found. |
You can try these changes here
|
website/src/content/docs/docs/howtos/Generate client libraries/13pagingOperations.mdx
Outdated
Show resolved
Hide resolved
|
||
## Using next link to indicate how to get the next page | ||
|
||
Next link is an absolute url that returned by paging operation, which indicate how to get the next page. |
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.
Next link is an absolute url that returned by paging operation, which indicate how to get the next page. | |
Next link is an absolute url returned by the paging operation, which indicates how to get the next page. |
## Using next link to indicate how to get the next page | ||
|
||
Next link is an absolute url that returned by paging operation, which indicate how to get the next page. | ||
If the response does not return next link, it should be the last page. |
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 the response does not return next link, it should be the last page. | |
If the response does not return a next link, it indicates the last page of results. |
|
||
Next link is an absolute url that returned by paging operation, which indicate how to get the next page. | ||
If the response does not return next link, it should be the last page. | ||
Next link should be annotated in response model with `@nextLink`. |
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.
Next link should be annotated in response model with `@nextLink`. | |
Next link should be annotated in the response model with `@nextLink`. |
If the response does not return next link, it should be the last page. | ||
Next link should be annotated in response model with `@nextLink`. | ||
|
||
There are two ways to indicate the paging operation with `@nextLink`: |
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.
There are two ways to indicate the paging operation with `@nextLink`: | |
There are two ways to indicate a paging operation with `@nextLink`: |
|
||
</ClientTabs> | ||
|
||
2. Use `@list` and `@pageItems` in core. |
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.
2. Use `@list` and `@pageItems` in core. | |
2. Use the `@list` and `@pageItems` decorators from TypeSpec core. |
|
||
## Using continuation token to indicate how to get the next page | ||
|
||
Continuation token is a string that returned by paging operation, which could be used as a parameter value for the paging operation to get the next page. |
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.
Continuation token is a string that returned by paging operation, which could be used as a parameter value for the paging operation to get the next page. | |
A continuation token is a string returned by a paging operation, which is used as a parameter value for the paging operation to get the next page. |
## Using continuation token to indicate how to get the next page | ||
|
||
Continuation token is a string that returned by paging operation, which could be used as a parameter value for the paging operation to get the next page. | ||
If the response does not return continuation token, it should be the last page. |
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 the response does not return continuation token, it should be the last page. | |
If the response does not return a continuation token, it indicates the last page of results. |
|
||
Continuation token is a string that returned by paging operation, which could be used as a parameter value for the paging operation to get the next page. | ||
If the response does not return continuation token, it should be the last page. | ||
Continuation token should be annotated in one of the request parameter with `@continuationToken`, as well as response model with `@continuationToken`. |
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.
Continuation token should be annotated in one of the request parameter with `@continuationToken`, as well as response model with `@continuationToken`. | |
The request parameter that corresponds to the continuation token value in the paging operation should be decorated with `@continuationToken`. Similarly, the response property that contains the continuation token value should also be decorated with `@continuationToken`. |
resolve: #2138