diff --git a/fern/products/sdks/guides/configure-auto-pagination.mdx b/fern/products/sdks/guides/configure-auto-pagination.mdx index e1960c5aa..5d9c363b7 100644 --- a/fern/products/sdks/guides/configure-auto-pagination.mdx +++ b/fern/products/sdks/guides/configure-auto-pagination.mdx @@ -152,17 +152,22 @@ To set up auto pagination for the Fern Definition: 1. Specify the pagination scheme, `offset` or `cursor` 1. Specify where your `results` are located, using dot-access notation. + +Include `step` in most offset pagination configurations to ensure the offset increments by the page size. Use `has-next-page` when your API returns a boolean indicator for additional pages. + + -```yaml Offset {6} +```yaml Offset {6-8} service: endpoints: listWithOffsetPagination: pagination: # Add pagination field offset: $request.page # Specify offset pagination scheme results: $response.data # Specify result location + step: $request.page_size # Recommended: ensures offset increments correctly + has-next-page: $response.has_more # Optional: path to next page indicator ``` - ```yaml Cursor {7} service: endpoints: @@ -172,7 +177,6 @@ service: next_cursor: $response.page.next.starting_after results: $response.data # Specify result location ``` -