Skip to content
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

Create pagination doc #441

Merged
merged 3 commits into from
Jun 21, 2018
Merged

Create pagination doc #441

merged 3 commits into from
Jun 21, 2018

Conversation

romil07
Copy link
Contributor

@romil07 romil07 commented Jun 7, 2018

No description provided.

@romil07 romil07 requested a review from GitHubSriramB June 7, 2018 07:02
Important fields explained:
- `endpointUrl` : Standard context here. The url that you intend to call.
- `callbackContextTemplate` : This is the set of parameters that we will need to call this API again. Generally, this will be derived from the response of the previous call. It's supposed to be a set of key-value pairs.
- `callbackRequiredTemplate` : This is basically a boolean flag which identifies whether further call to API is needed. It does so based on the response of the previous call.
Copy link
Contributor

Choose a reason for hiding this comment

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

Add that recalling the API needs to be handled by the client. In our case it will be task editor UI.

Depending on the kind of pagination supported by the underlying API, the logic to determine the value of "callbackRequiredTemplate" can be anything.
We expect both "callbackContextTemplate" and "callbackRequiredTemplate" to be provided as mustache templates. Examples follow:

### Sample Data Source
Copy link
Contributor

Choose a reason for hiding this comment

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

Add examples of how 2 well know formats can be supported?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will just add the link of the doc which explains this. Explaining that here would be redundant I think.

```
{
"endpointUrl": “someUrl”
"callbackContextTemplate": "" //set of parameters that need to be used in the next call
Copy link
Contributor

Choose a reason for hiding this comment

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

remove comments as you are explaining these fields down below

@@ -0,0 +1,41 @@
# Pagination
The support of pagination is data sources is given by following template:
Copy link
Contributor

Choose a reason for hiding this comment

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

typo - … pagination in data source bindings ...

### Sample Data Source
```
{
"endpointUrl": "{{endpoint.url}}/{{project}}/_apis/****/****?&$top=500&continuationToken={{{continuationToken}}}",
Copy link
Contributor

Choose a reason for hiding this comment

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

give a real world example here.

also, have reference to some tasks that you have edited to support pagination from here.

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