jackye1995 commented on code in PR #9660:
URL: https://github.com/apache/iceberg/pull/9660#discussion_r1490183371


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -1482,6 +1490,33 @@ components:
       explode: false
       example: "vended-credentials,remote-signing"
 
+    page-token:
+      name: pageToken
+      in: query
+      description:
+        An opaque token which allows clients to make use of pagination for a 
list API (e.g. ListTables) by signaling to the service
+        that they would prefer response to be paginated.
+        
+        Clients will initiate the request by sending an empty pageToken e.g. 
GET /tables?pageToken or /tables?pageToken=

Review Comment:
   I think this is missing the description of the case after the initial 
request. After initial request, it is expected that the NextPageToken in the 
last response can be use here to request items in the next page.



##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -1482,6 +1490,33 @@ components:
       explode: false
       example: "vended-credentials,remote-signing"
 
+    page-token:
+      name: pageToken
+      in: query
+      description:
+        An opaque token which allows clients to make use of pagination for a 
list API (e.g. ListTables) by signaling to the service
+        that they would prefer response to be paginated.
+        
+        Clients will initiate the request by sending an empty pageToken e.g. 
GET /tables?pageToken or /tables?pageToken=
+        For servers that support pagination, they would recognize pageToken 
and honor the contracts specified above 
+        by returning a NextPageToken in response if there are more results 
available.

Review Comment:
   for "by returning a NextPageToken in response if there are more results 
available." can we just move this up as a part of the the contract above?



##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -1482,6 +1490,33 @@ components:
       explode: false
       example: "vended-credentials,remote-signing"
 
+    page-token:
+      name: pageToken
+      in: query
+      description:
+        An opaque token which allows clients to make use of pagination for a 
list API (e.g. ListTables) by signaling to the service
+        that they would prefer response to be paginated.
+        
+        Clients will initiate the request by sending an empty pageToken e.g. 
GET /tables?pageToken or /tables?pageToken=
+        For servers that support pagination, they would recognize pageToken 
and honor the contracts specified above 

Review Comment:
   nit: ~~would~~ will



##########
open-api/rest-catalog-open-api.py:
##########
@@ -75,6 +75,13 @@ class Namespace(BaseModel):
     )
 
 
+class NextPageToken(BaseModel):
+    __root__: str = Field(
+        ...,
+        description='An opaque next page token, when non-empty this indicates 
that more results can be returned by server. This should be used in the next 
request for the query parameter of pageToken.',

Review Comment:
   nit: non null and non empty 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to