From deff9a9448a00434f53338c373449572f2ab4826 Mon Sep 17 00:00:00 2001 From: "chris.mcdonnell" Date: Wed, 25 Nov 2026 14:42:52 +0000 Subject: [PATCH 1/2] Document behavior that changes when migrating to SDK Config Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../home/pages/fern-instructions/sdks/migrate.mdx | 3 ++- .../generators/migration-guides/sdk-config.mdx | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/fern/products/home/pages/fern-instructions/sdks/migrate.mdx b/fern/products/home/pages/fern-instructions/sdks/migrate.mdx index 14bd67286..f0ac29b11 100644 --- a/fern/products/home/pages/fern-instructions/sdks/migrate.mdx +++ b/fern/products/home/pages/fern-instructions/sdks/migrate.mdx @@ -10,7 +10,8 @@ Use this for config migrations and major generator or CLI upgrades. 1. Preview: `fern sdk migrate --dry-run`. Narrow it with `--group`, `--language` or `--api`. `--strict` treats mapping problems as errors. 2. Apply: `fern sdk migrate`. It creates or merges `sdk-config.yml` beside the legacy configuration (`--output` to choose the path). -3. Run `fern check` and `fern generate --preview`, and compare the output with the current SDK. +3. Fix each warning. Tests are opt-in (`generation.unitTests`, `generation.wireTests`). Keep a header or bearer option name with `x-fern-header` or `x-fern-bearer` in an overlay. Add `step` to offset `x-fern-pagination`. Move an `x-fern-base-path` into the server URLs. +4. Run `fern check` and `fern generate --preview`, and compare the output with the current SDK. ## Upgrade the CLI and generators diff --git a/fern/products/sdks/legacy/generators/migration-guides/sdk-config.mdx b/fern/products/sdks/legacy/generators/migration-guides/sdk-config.mdx index 71662fa00..f1b07d0a9 100644 --- a/fern/products/sdks/legacy/generators/migration-guides/sdk-config.mdx +++ b/fern/products/sdks/legacy/generators/migration-guides/sdk-config.mdx @@ -196,6 +196,20 @@ Don't copy a legacy generator version into `generatorVersion`. The CLI rejects v `fern generate --version` sets the version of the generated SDK package, not the generator version. +### Check behavior that changes + +The new generators don't reproduce every legacy behavior. `fern sdk migrate` warns about the auth option names, API settings and spec extensions in the table. Review the warnings, or run `fern sdk migrate --dry-run --strict` to fail on them, and fix each one before you generate: + +| Legacy configuration | Behavior after migration | What to do | +|---|---|---| +| Tests generated by default | Tests and their CI workflow are opt-in | Set `generation.unitTests` or `generation.wireTests`. See [Testing](/learn/sdks/deep-dives/testing). | +| Header auth `name` or bearer `token.name` | The option is renamed to `apiKey` or `token` | Set `x-fern-header` or `x-fern-bearer` with `name` on the security scheme in an [overlay](/learn/api-definitions/openapi/overlays). | +| API settings with no SDK Config field, such as `filter`, `resolve-aliases` or `coerce-consts-to` | The setting is dropped. With `filter`, excluded endpoints are generated | Remove filtered endpoints with an overlay, and compare the output for the other settings. | +| `only-include-referenced-schemas`, `inline-all-of-schemas` | Copied to `sdk-config.yml`, but the generators don't apply them yet | Expect unreferenced and `allOf` parent types in the output. | +| `x-fern-base-path` | Requests omit the base path | Add the base path to the server or environment URLs. | +| `x-fern-sdk-variables` | Each variable is a parameter on every request, not a client option | Check the generated method signatures. | +| Offset [`x-fern-pagination`](/learn/api-definitions/openapi/extensions/pagination) without `step` | Python and Go return the raw page with no pager | Set `step` to the page size parameter, for example `step: $request.limit`. | + ## Validate and preview Validate the migrated project, then preview the migrated target: From 2f9f3084c12d88a7580e6f2be613043968ce4051 Mon Sep 17 00:00:00 2001 From: "chris.mcdonnell" Date: Wed, 25 Nov 2026 14:44:39 +0000 Subject: [PATCH 2/2] Use the Oxford comma Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../sdks/legacy/generators/migration-guides/sdk-config.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fern/products/sdks/legacy/generators/migration-guides/sdk-config.mdx b/fern/products/sdks/legacy/generators/migration-guides/sdk-config.mdx index f1b07d0a9..60851e147 100644 --- a/fern/products/sdks/legacy/generators/migration-guides/sdk-config.mdx +++ b/fern/products/sdks/legacy/generators/migration-guides/sdk-config.mdx @@ -198,7 +198,7 @@ Don't copy a legacy generator version into `generatorVersion`. The CLI rejects v ### Check behavior that changes -The new generators don't reproduce every legacy behavior. `fern sdk migrate` warns about the auth option names, API settings and spec extensions in the table. Review the warnings, or run `fern sdk migrate --dry-run --strict` to fail on them, and fix each one before you generate: +The new generators don't reproduce every legacy behavior. `fern sdk migrate` warns about the auth option names, API settings, and spec extensions in the table. Review the warnings, or run `fern sdk migrate --dry-run --strict` to fail on them, and fix each one before you generate: | Legacy configuration | Behavior after migration | What to do | |---|---|---|