Pagination
Configure pagination for methods that return lists:
pagination_service.proto
1 syntax = "proto3"; 2 3 package userservice.v1; 4 5 service UserService { 6 rpc ListUsers(ListUsersRequest) returns (ListUsersResponse) { 7 option (x_fern_pagination) = '{ 8 "cursor": "page_token", 9 "results": "users", 10 "next_cursor": "next_page_token", 11 "has_next_page": "has_more" 12 }'; 13 } 14 } 15 16 message ListUsersRequest { 17 int32 page_size = 1; 18 string page_token = 2; 19 string filter = 3; 20 } 21 22 message ListUsersResponse { 23 repeated User users = 1; 24 string next_page_token = 2; 25 bool has_more = 3; 26 int32 total_count = 4; 27 }