Skip to content

Paginate all SCIM list requests in the SDK#188

Closed
xinjiezhen-db wants to merge 1 commit intodatabricks:mainfrom
xinjiezhen-db:java-scim-pagination
Closed

Paginate all SCIM list requests in the SDK#188
xinjiezhen-db wants to merge 1 commit intodatabricks:mainfrom
xinjiezhen-db:java-scim-pagination

Conversation

@xinjiezhen-db
Copy link
Copy Markdown
Contributor

Changes

This PR incorporates two hard-coded changes for the SCIM API in the Python SDK:

startIndex starts at 1 for SCIM APIs, not 0. However, the existing .Pagination.Increment controls both the start index as well as whether the pagination is per-page or per-resource. Later, we should replace this extension with two independent OpenAPI options: one_indexed (defaulting to false) and pagination_basis (defaulting to resource but can be overridden to page).
If users don't specify a limit, the SDK will include a hard-coded limit of 100 resources per request. We could add this to the OpenAPI spec as an option default_limit, which is useful for any non-paginated APIs that later expose pagination options and allow the SDK to gracefully support those. However, we don't want to encourage folks to use this pattern: all new list APIs are required to be paginated from the start.

Tests

@xinjiezhen-db xinjiezhen-db requested review from mgyucht and nfx November 16, 2023 07:32
@mgyucht mgyucht mentioned this pull request Nov 24, 2023
@mgyucht
Copy link
Copy Markdown
Contributor

mgyucht commented Nov 24, 2023

Closing this in favor of #193.

@mgyucht mgyucht closed this Nov 24, 2023
github-merge-queue bot pushed a commit that referenced this pull request Nov 29, 2023
## Changes
Supersedes #188.

This PR incorporates two hard-coded changes for the SCIM API in the
Python SDK:

startIndex starts at 1 for SCIM APIs, not 0. However, the existing
.Pagination.Increment controls both the start index as well as whether
the pagination is per-page or per-resource. Later, we should replace
this extension with two independent OpenAPI options: one_indexed
(defaulting to false) and pagination_basis (defaulting to resource but
can be overridden to page).
If users don't specify a limit, the SDK will include a hard-coded limit
of 100 resources per request. We could add this to the OpenAPI spec as
an option default_limit, which is useful for any non-paginated APIs that
later expose pagination options and allow the SDK to gracefully support
those. However, we don't want to encourage folks to use this pattern:
all new list APIs are required to be paginated from the start.

## Tests
<!-- How is this tested? -->

---------

Co-authored-by: Xinjie Zheng <[email protected]>
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.

2 participants