From 656492e90365cd2b2831c7b9014479f45b8d0ebc Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sat, 12 Sep 2026 17:06:02 +0000 Subject: [PATCH] docs(go): document enableNestedRequestBodyPagination Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../sdks/deep-dives/configure-auto-pagination.mdx | 4 +++- fern/products/sdks/generators/go/configuration.mdx | 13 ++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/fern/products/sdks/deep-dives/configure-auto-pagination.mdx b/fern/products/sdks/deep-dives/configure-auto-pagination.mdx index a3b1c1e061..14390db3e3 100644 --- a/fern/products/sdks/deep-dives/configure-auto-pagination.mdx +++ b/fern/products/sdks/deep-dives/configure-auto-pagination.mdx @@ -65,7 +65,9 @@ results instead of managing pagination complexity manually. A page property that lives in the request body rather than in a query parameter requires the [`enableRequestBodyPagination`](/learn/sdks/generators/go/configuration#enablerequestbodypagination) - configuration option. + configuration option. If the page property is nested inside another request + body object (for example, `$request.options.offset`), also enable + [`enableNestedRequestBodyPagination`](/learn/sdks/generators/go/configuration#enablenestedrequestbodypagination). diff --git a/fern/products/sdks/generators/go/configuration.mdx b/fern/products/sdks/generators/go/configuration.mdx index 55a5370512..804b9f9399 100644 --- a/fern/products/sdks/generators/go/configuration.mdx +++ b/fern/products/sdks/generators/go/configuration.mdx @@ -68,7 +68,18 @@ option.WithUserAgentAppInfo("partner-app", "3.1.0", "+https://partner.example") -Generates [auto-pagination](/learn/sdks/deep-dives/auto-pagination) for endpoints whose cursor or offset page property is a top-level request body property (for example, `cursor: $request.cursor`). The generated pager advances the page by setting the field on the request object instead of on the query string. This defaults to `false` because enabling it changes the affected methods' return types from a response to a pager. Nested body page properties (for example, `cursor: $request.pagination.cursor`) are unsupported and still generate a plain, non-paginated method. +Generates [auto-pagination](/learn/sdks/deep-dives/auto-pagination) for endpoints whose cursor or offset page property is a top-level request body property (for example, `cursor: $request.cursor`). The generated pager advances the page by setting the field on the request object instead of on the query string. This defaults to `false` because enabling it changes the affected methods' return types from a response to a pager. Nested body page properties (for example, `cursor: $request.pagination.cursor`) still generate a plain, non-paginated method unless [`enableNestedRequestBodyPagination`](#enablenestedrequestbodypagination) is also enabled. + + + +Extends [`enableRequestBodyPagination`](#enablerequestbodypagination) to endpoints whose page property lives inside a nested request body object (for example, `offset: $request.options.offset` or `cursor: $request.options.pagination.cursor`). The generated pager copies the request and each optional intermediate object when advancing, so it works whether the caller sets the nested object or leaves it `nil`. Requires `enableRequestBodyPagination: true`, and defaults to `false` because enabling it changes the affected methods' return types from a response to a pager. + +```yaml +- name: fernapi/fern-go-sdk + config: + enableRequestBodyPagination: true + enableNestedRequestBodyPagination: true +```