🌿 [Scheduled] Upgrade Fern CLI #67
Merged
Merged
Conversation
|
🌿 Preview your docs: https://ddn-demo-preview-32474e22-5411-4d9e-8cf5-3944c6086383.docs.buildwithfern.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrading from
4.92.0to5.15.3- Changelog5.15.3fix:Fixfern checkto respectx-fern-ignorewhen validating duplicate SDK method names. Operations marked withx-fern-ignore: trueare now excluded from the duplicate override check.5.15.2fix:Fix dynamic IR upload and check endpoints to pass correct field names (version, snippetConfiguration) matching the FDR server contract, resolving 500 errors during SDK generation.5.15.1fix:Sourceorg_idon the replay PostHog event fromfern.config.json(the project organization slug, like every other CLI flow), not from a Venus token lookup.5.15.0feat:Bake replay initialization intofern generate. Repos with a prior[fern-generated]commit but no
.fern/replay.locknow auto-bootstrap inline during the post-generationpipeline — eliminating the need to run
fern replay initas a separate step.5.14.1fix:Fix non-deterministic snippet output across runs for SDK generators that consume thedynamic IR (Java, PHP, Python v2, Go v2, Ruby v2, Swift, Rust). The dynamic IR now
tags examples with
isUserSpecifiedand emits deterministic example ids; affectedgenerators select examples using the canonical "all user, else first autogenerated"
rule, matching TS v1 / Python v1 behavior.
60 additional updates, see more
5.14.0feat:Emit thereplayPostHog event from cloud generation, withsurface,org_id,duration_ms, and additional patch counters.5.13.2fix:Improve 429 rate-limit retry logic for remote generation: increase max retriesfrom 3 to 5, respect the server's retryAfter hint as a minimum delay, and widen
jitter (0.2 → 0.5) to reduce thundering-herd retries when many generators run
concurrently across multiple API groups.
5.13.1fix:Fix dynamic IR upload URLs request passing empty apiId and irVersions parameters, which caused 500 errors from FDR during SDK generation.5.12.0feat:fern automations generatenow automatically retries 429 Too Many Requests responses withexponential backoff (2s → 120s, up to 3 attempts, jittered). Automation runs are unattended,
so transient rate limiting should not fail the run and ask a human to re-trigger with a flag.
Real outages still surface as failures after retries exhaust.
feat:Surface CLI errors and warnings as GitHub Actions annotations when running under GHA.fern automations generatenow emits a structured::error::workflow command for everyfailed generator, anchored on the exact line in
generators.ymlso the annotation appearsinline on the file in the PR's Files-changed view, with the API / group / generator name
in the title and the failure reason in the body.
All other commands (e.g.
fern generate,fern check) emit annotations from anylogger.error/logger.warncall, providing baseline coverage for failures that don'tflow through the per-generator collector. Status-only logs (
omitOnTTY) are filtered outso they don't burn through GitHub's per-step annotation cap.
5.11.0feat:Forward the top-levelreplayblock fromgenerators.ymlto Fiddle'screateJobV3call so cloud generation honorsreplay.enabled: falseandskips the replay pipeline when a customer opts out. Activates once the
@fern-fern/fiddle-sdkcatalog pin advances to a version that exposesreplayonCreateJobRequestV2(schema landed in fern-api/fiddle#729).fix:Fixfern check --api <name>failing when broken-links validation is enabledand
docs.ymlreferences multiple APIs. The docs validator now always seesthe full set of API workspaces (so the
valid-markdown-linksrule can resolveevery API referenced from the docs navigation), while the
--apifilter isstill applied to API-level validation only.
5.10.3fix:Apply per-localenavbar-linksoverlays in the defaultfern docs devapppreview server (the legacy preview and production publish already did this,
so dev was the odd one out and showed English CTAs on
/<lang>/URLs).Also matches translation overrides for skip-slug sibling tabs positionally
when slug-based matching can't disambiguate them — without this, only the
one tab whose slug retained its own segment got translated.
5.10.0fix:Fix self-hosted GitHub clone failing with "Invalid username or token" whenthe user's
${GITHUB_TOKEN}is an OAuth user token (gho_) or personalaccess token (ghp_, github_pat_). The clone URL hardcoded the
x-access-token:username, which is the format reserved for GitHub Appinstallation tokens (ghs_). Now selects the format based on the token
prefix, so both auth modes work.
5.9.0feat:Acceptbranchundergithubwhenmodeisreleaseingenerators.yml. Thisallows users to configure a non-default branch for release mode in preparation for
wiring the field through to the remote generation service.
5.8.1fix:Add avalid-changelog-slugrule tofern checkthat errors when a changelog'seffective URL slug is not one of the values served as an RSS/Atom/JSON feed by
the docs platform (
changelog,changelogs,release-notes,releasenotes,whats-new,whatsnew). Severity defaults toerrorand can be overriddenvia
check.rules.valid-changelog-slugindocs.yml.5.8.0feat:Add support for a customrobots.txtfile indocs.yml. Setagents.robots-txtto a relativefilepath and Fern will host the file at
/robots.txton your docs site, overriding theauto-generated default.
fix:Show a clear, actionable error when the Fern GitHub App is not installed onthe target repository instead of the generic "Failed to create job" message.
5.7.10fix:Fix the OpenAPI 3.1 -> IR converter to respect endpoint-levelsecurity: []opt-outs whenauthis configured ingenerators.yml. Previously, declaring anauthscheme at the workspace level would silently override every endpoint-levelsecurityfield — including explicit empty-array opt-outs — so endpoints that intentionally opted out of auth (e.g. an OAuth token endpoint, or a public endpoint) ended up rendered in docs and SDKs as if they required the global auth scheme.5.7.9fix:fern docs devnow fails with a clear error when nodocs.ymlis present, instead of exiting silently.fix:Fix section landing pages withskip-slug: trueignoring frontmatterslugdeclarations.Sections now compute separate slugs for the overview page (honors frontmatter) and for
children (respects skip-slug), so both features work correctly together.
5.7.8fix:Fixfern logoutshowing a "localhost refused to connect" error page bystarting a local server to serve a branded confirmation page, matching the login flow.
Also update both login and logout confirmation pages with new branded designs.
5.7.7fix:Improve logging when APIs are skipped during docs generation. Skipped APIsnow log at error level (instead of warn) with the API name and a clear
reason. Repetitive per-endpoint frontmatter warnings are aggregated into
a single summary line per API.
5.7.6fix:Fix docs preview server showing "ready" message when the server processcrashes on startup. The CLI now exits with a clear error message instead.
fix:On Windows, recover critical standalone node_modules packages (next,react-dom, styled-jsx) when symlink resolution fails due to long .pnpm
directory names. The CLI now scans the .pnpm store and copies packages
directly as a fallback.
5.7.5fix:SendcustomDomainswhen publishing docs translations so FDR mirrors the translated blob to every URL the docs are published to. Previously translations were only written under the canonical fern URL, so docs sites served from a custom domain with a basepath (e.g.buildwithfern.com/learn) 404'd on every localized page.5.7.4fix:Strip Windows drive letter prefixes from resolved image paths in docs previewto prevent raw filesystem paths from leaking into rendered HTML on Windows.
5.7.3fix:Fix image path resolution on Windows forfern docs devandfern generate docs.Path utilities (
resolve,dirname,join) now normalize output to forward slashes,preventing file ID lookup mismatches caused by mixed path separators on Windows.
5.7.2fix:Allow BCP 47 locale tags (e.g.ja-JP,pt-BR,zh-Hans-CN) in thetranslationsandlanguagesfields ofdocs.yml. Previously these were rejected by the JSON-schema validator withmust be one of [en, es, fr, ...].5.7.1fix:Preserve OpenAPIdefaultvalues for array schemas across query parameters,headers, request bodies, and response body properties so docs can render
"Defaults to ..." metadata for arrays.
5.7.0feat:cli-v2:fern sdk generate --api -andfern sdk preview --api -now read theOpenAPI/AsyncAPI spec from stdin (e.g.
cat openapi.json | fern sdk generate --api - --org acme --target typescript --output ./sdk).feat:cli-v2:fern api split --output -prints the generated overlay/overrides forthe matching spec to stdout as a preview, without modifying the workspace
(no git-HEAD restore, no fern.yml updates). Requires
--apito select a singlespec.
5.6.1fix:Fix translated docs pages failing to resolve shared snippets (<Markdown src="..."/>and<Code src="..."/>).Snippet references are now resolved before registering translations, with locale-aware loading that prefers
translated snippets (e.g.,
translations/zh/snippets/foo.mdx) when available.5.6.0feat:Addfern automations upgradecommand that wrapsfern upgradeandfern generator upgradeinto a single invocation with structured JSONoutput (
--json). Designed for consumption by the fern-upgrade GitHubAction.
fix:Replace brittle hardcoded changelog URL map inupgradeGenerator.tswitha regex-based derivation that supports all current and future generators.
5.5.0feat:Addalpha,beta,preview, andlegacyas supported values for thex-fern-availabilityOpenAPI extension and theavailabilityfieldin Fern Definitions. These flow through the IR to generators and docs.
feat:Use first-class FDR Availability values (Alpha, Preview, Legacy) whenconverting IR to FDR, replacing the previous fallback mappings to Beta /
Deprecated. Bumps @fern-api/fdr-sdk to a release that includes the new
enum values.
5.4.3fix:Fix OpenAPI endpoints that declare only a204 No Contentsuccess responsebeing dropped during OpenAPI -> IR conversion. The user-defined
204statuscode is now preserved on the endpoint response so docs display it correctly
instead of falling back to a default
200.5.4.2fix:Fixbroken-linksfalse positives for absolute links on sites that configure abasePath(e.g.https://docs.example.com/product). Page slugs are stored withthe basePath prepended (
product/about), but authors commonly write site-relativeabsolute links without it (
/about,/v2/guide). The link validator now alsochecks the basePath-prefixed form so both conventions resolve.
5.4.1fix:Fix OpenAPI parsing crash when specs contain non-standardadditionalProperties: "true"(string instead of boolean).The parser was attempting to use the
inoperator on a string value, causing aCannot use 'in' operator to search for 'type' in trueerror.fix:Surface rule initialization errors infern checkinstead of exiting silently.Previously, when a validation rule (e.g.
valid-markdown-links) failed toinitialize because its docs configuration could not be resolved — for
example, a navigation
folder:entry pointing at a path that does notexist —
fern checkwould exit with code 1 and no visible error message.Now the underlying failure (e.g.
Folder not found: …) is reported as afatal violation on
docs.yml.5.4.0feat:Makeauthoptional at the service level in Fern Definition files.When omitted, auth is inherited from the root API-level auth scheme.
This allows users to only specify
auth: falsewhen they explicitly want to disable auth.5.3.0feat:Translation overlays can now override navbar links (CTAs) per locale. Setnavbar-links:inside
translations/<locale>/docs.ymland the per-locale FDR upload will use thoseinstead of the docs-level navbar-links. Local icon files referenced from the overlay
are uploaded and resolved alongside the rest of the docs assets.
5.2.2fix:Translateddocs.ymloverlays are now read directly fromtranslations/<locale>/docs.yml,so an extra nested
fern/folder is no longer required. The legacytranslations/<locale>/fern/docs.ymllocation continues to work as a fallback.5.2.1fix:Fix auth scheme descriptions being lost when using generators.yml auth-schemes.When security schemes are overridden in generators.yml, Fern now preserves the
descriptions from the OpenAPI spec's components.securitySchemes instead of using
generic placeholder text.
5.2.0feat:Addmulti-sourceproperty to docs.ymlinstancesconfiguration. When enabled, docs registrationuses a basepath-aware S3 key format, allowing multiple independent doc sites to be hosted under the
same custom domain with different basepaths. This replaces
experimental.basepath-aware, which is nowdeprecated but still supported. When
multi-source: true, the CLI validates that theurlandcustom-domainshare the same basepath.5.0.0break:Removeog:background-imagemetadata key. Useog:dynamic:background-imageinstead,which is consistent with other
og:dynamic:*settings.4.109.0feat:cli-v2: Add support for GraphQL specs infern.yml. Specs can now be declaredwith a
graphqlkey (plus optionalname,origin, andoverrides) and arerendered in the docs pipeline. SDK generation targets that reference an API
containing a GraphQL spec emit a non-fatal warning and skip the GraphQL spec,
since GraphQL SDK generation is not supported.
4.107.3fix:Fixfern generate --docs --previewhang when OpenAPI specs contain circular$refchains. The unbundled fallback document now has its circular referencesreplaced with opaque object schemas so downstream converters no longer
infinite-loop.
4.107.2fix:Suppress additional Sentry false positives: EADDRINUSE port conflicts,MDX/acorn parse errors from docs preview and publishing, version range
strings in generators.yml, missing fern project when using --id flag,
non-JSON fern.config.json, and absolute filepath in OpenAPI spec config.
4.107.1fix:Make OpenAPI validation errors non-fatal during docs generation. Previously,validation issues like "Self-referencing circular pointer" or parameter name
collisions would abort
fern generate --docsentirely. The CLI now logswarnings and skips the offending API workspace so the rest of the docs can
still be published. These validations remain errors in
fern check.4.107.0feat:Addinfer-discriminated-union-base-propertiesOpenAPI parser setting.When enabled, the parser intersects the resolved (allOf-flattened) property
maps of every variant of a discriminated
oneOfand lifts properties thatappear in all variants with structurally-equal schemas into the union's
common properties. SDKs (e.g. C#, Java, Go) that already support union base
properties can then expose those shared fields directly on the union type
without forcing callers to cast to a concrete variant. Defaults to false.
4.106.3fix:SendgitattributesEntriesto Fiddle onfern replay initso thegenerated PR marks
.fern/replay.lockaslinguist-generated=true.Previously the entries were written into a temp clone that was discarded
and never reached the server. Requires a matching Fiddle server change
to consume the new field.
4.106.2fix:Translation no longer fails for an entire locale when a single MDX file has a parse error.Invalid pages are skipped with a warning that includes the file path, and the base page is used as a fallback.
4.106.1fix:Fix OpenAPI importer generating duplicate type names when an operation'srequest body $refs a top-level components.schemas.X schema whose name
collides with the auto-generated request wrapper name. The wrapper is now
disambiguated by using "Body" instead of "Request" in the generated name.
4.106.0feat:Add support for translating navigation labels (tabs, products, versions, sections, pages, announcements)via YAML overlay files in
translations/<lang>/fern/. The overlay files use the same format aswrite-translationoutput and are deep-merged over the source navigation configuration.4.105.0fix:Fix branch creation during signed commit push in generator-cli. GitHub'supdateRef API returns 422 (not 404) when the target branch does not exist,
so the createRef fallback was unreachable.
feat:fern docs devnow exits with a hard error on Windows when long path supportis not enabled, instead of printing a warning.
4.104.0feat:Support simplified string syntax fortranslationsfield in docs.yml.You can now use
translations: [en, ja, fr]instead of requiringtranslations: [{lang: en}, {lang: ja}, {lang: fr}]. The verboseobject syntax remains supported for specifying
default: true.4.103.1fix:Fix translation directory check to treat the first locale as the default when no explicitdefault: trueis set, matching the behavior of the rest of the CLI.4.103.0feat:Support BCP 47 locale tags (e.g.ja-JP,pt-BR,zh-Hans-CN) in thetranslationsandlanguagesfields ofdocs.yml. Previously onlytwo-letter language codes were accepted.
4.102.0feat:Add validation tofern check/fern docs checkthat verifies all configuredtranslation locales have a corresponding directory under
fern/translations/.If a directory is missing, a clear error message is printed showing the expected
directory structure.
4.101.0feat:Addwebsocket-oneof-displaysetting todocs.yml. When set togrouped,WebSocket messages with oneOf bodies are rendered as a single parent entry
with nested variants instead of flattened separate entries (default:
flat).4.100.3fix:Fixfern generate --docs --previewto register translations for preview URLs.Previously, translation registration was skipped entirely in preview mode,
causing translated docs to not appear in preview deployments.
4.100.2fix:Fixfern docs devto serve translated page content when viewing localized pages.4.100.1fix:Fixfern automations generatestep summary not displaying SDK versions.Upgrade Fiddle SDK to consume the new
actualVersionfield fromFinishedTaskStatus, which Fiddle now returns for both AUTO and explicitversioning modes. Falls back to log-regex parsing and locally-resolved
version for backward compatibility.
fix:Fixfern docs devto serve translated page content when viewing localized pages.4.99.0feat:[Alpha] Add support for atranslationsblock indocs.ymlto configure multi-language documentation.Each entry specifies a locale (
lang) and optionally marks it as the default language.fix:Include docs translation metadata in the docs definition published to FDR so generatedfdr.jsonadvertises configured locales alongside uploaded translation files.
4.98.0feat:Move docs theme commands (export, list, upload) from CLI v2 to CLI v1.Commands are now available as
fern docs theme export,fern docs theme list, andfern docs theme upload.Uses DocsWorkspace for path resolution, v1 auth, and validates all file references before uploading.
4.97.0feat:[Alpha] Add support for atranslationsblock indocs.ymlto configure multi-language documentation.Each entry specifies a locale (
lang) and optionally marks it as the default language.fix:Include docs translation metadata in the docs definition published to FDR so generatedfdr.jsonadvertises configured locales alongside uploaded translation files.
4.96.0feat:Add optionalbasePropertiesfield toUndiscriminatedUnionTypeDeclarationin the IR schema.Both the V3 importer and the legacy OpenAPI importer now extract sibling properties from
oneOf/anyOfschemas and populatebasePropertieson undiscriminated unions.4.95.0feat:Addplaceholderfield to auth scheme configuration (basic, bearer, header) for controllingexample values in dynamic code snippets. The fallback chain is: explicit placeholder > generic placeholder.
Configurable via Fern definition YAML and OpenAPI extensions (x-fern-basic, x-fern-bearer, x-fern-header).
4.94.2fix:Fix Python dynamic snippet generation to respect theuse_typeddict_requestsconfiguration option. When enabled, dynamic snippets now generate dict literals
instead of Pydantic model constructors for object and discriminated union types.
4.94.1fix:Fix global theme asset downloads preserving original filenames and extensions.Previously, assets downloaded from S3 CAS URLs (whose pathname is a raw content
hash) were saved without a file extension, breaking downstream MIME type detection.
The CLI now reads the filename from the presigned URL's response-content-disposition
query parameter, falling back to the Content-Disposition response header, then
Content-Type, so files land on disk with their correct names (e.g. logo.svg).
4.94.0feat:Add consumer-side support for theglobal-themekey in docs.yml. When a docs sitedeclares
global-theme: <name>, the CLI fetches the named theme from Fern's cloudregistry and merges it into the docs configuration before building (theme values win
for branding fields). Works with
fern generate --docs,fern generate --docs --preview,and
fern docs dev(dev mode requires FERN_TOKEN to be set).4.93.0feat:Exposeclaude-codeunderpage-actionsindocs.ymlso docs sites can toggle the"Connect to Claude Code" button (e.g.
page-actions.options.claude-code: falseorpage-actions.default: claude-code).Requested by: Fern Dashboard (ddn-demo)