-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add pagination to open api spec for listing of namespaces, tables, views #9660
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
Changes from all commits
231b4dd
a3dc720
a1e20ad
4128211
25656b2
e0307a1
c78f251
e25c70a
6965325
77df1a5
aab3caa
eed29cc
918a1ad
ef4af36
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -201,6 +201,8 @@ paths: | |
If `parent` is not provided, all top-level namespaces should be listed. | ||
operationId: listNamespaces | ||
parameters: | ||
- $ref: '#/components/parameters/page-token' | ||
- $ref: '#/components/parameters/page-size' | ||
- name: parent | ||
in: query | ||
description: | ||
|
@@ -448,6 +450,9 @@ paths: | |
summary: List all table identifiers underneath a given namespace | ||
description: Return all table identifiers under this namespace | ||
operationId: listTables | ||
parameters: | ||
- $ref: '#/components/parameters/page-token' | ||
- $ref: '#/components/parameters/page-size' | ||
responses: | ||
200: | ||
$ref: '#/components/responses/ListTablesResponse' | ||
|
@@ -1070,6 +1075,9 @@ paths: | |
summary: List all view identifiers underneath a given namespace | ||
description: Return all view identifiers under this namespace | ||
operationId: listViews | ||
parameters: | ||
- $ref: '#/components/parameters/page-token' | ||
- $ref: '#/components/parameters/page-size' | ||
responses: | ||
200: | ||
$ref: '#/components/responses/ListTablesResponse' | ||
|
@@ -1482,6 +1490,25 @@ components: | |
explode: false | ||
example: "vended-credentials,remote-signing" | ||
|
||
page-token: | ||
name: pageToken | ||
in: query | ||
required: false | ||
allowEmptyValue: true | ||
schema: | ||
$ref: '#/components/schemas/PageToken' | ||
|
||
page-size: | ||
name: pageSize | ||
in: query | ||
description: | ||
For servers that support pagination, this signals an upper bound of the number of results that a client will receive. | ||
For servers that do not support pagination, clients may receive results larger than the indicated `pageSize`. | ||
required: false | ||
schema: | ||
type: integer | ||
rahil-c marked this conversation as resolved.
Show resolved
Hide resolved
|
||
minimum: 1 | ||
|
||
############################## | ||
# Application Schema Objects # | ||
############################## | ||
|
@@ -1581,6 +1608,17 @@ components: | |
type: string | ||
example: [ "accounting", "tax" ] | ||
|
||
PageToken: | ||
description: | ||
An opaque token which allows clients to make use of pagination for a list API (e.g. ListTables). | ||
Clients will initiate the first paginated request by sending an empty `pageToken` e.g. `GET /tables?pageToken` or `GET /tables?pageToken=` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rahil-c, in a spec you always want to be specific, not give options. Options make the spec more complicated. Here, only the second form should be added. The first form with no There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trying to remember what was decided during the community sync discussion, https://www.youtube.com/watch?v=uAQVGd5zV4I, starting at 45:04, seems like you said we should support both there. But maybe it's a misunderstanding of what Rahil meant there when he was talking about the first option of value not present. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rdblue @jackye1995 Yea I think based on the community sync I thought we were suppose to be flexible for what users can do hence I included the two options in the description. I can remove the first form if needed. |
||
signaling to the service that the response should be paginated. | ||
|
||
Servers that support pagination will recognize `pageToken` and return a `next-page-token` in response if there are more results available. | ||
After the initial request, it is expected that the value of `next-page-token` from the last response is used in the subsequent request. | ||
Servers that do not support pagination will ignore `next-page-token` and return all results. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Servers that do not support pagination will ignore There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will fix this. |
||
type: string | ||
|
||
TableIdentifier: | ||
type: object | ||
required: | ||
|
@@ -3169,6 +3207,8 @@ components: | |
ListTablesResponse: | ||
type: object | ||
properties: | ||
next-page-token: | ||
$ref: '#/components/schemas/PageToken' | ||
identifiers: | ||
type: array | ||
uniqueItems: true | ||
|
@@ -3178,6 +3218,8 @@ components: | |
ListNamespacesResponse: | ||
type: object | ||
properties: | ||
next-page-token: | ||
$ref: '#/components/schemas/PageToken' | ||
namespaces: | ||
type: array | ||
uniqueItems: true | ||
|
Uh oh!
There was an error while loading. Please reload this page.