🌿 [Scheduled] Upgrade Fern CLI - #6559
Open
fern-api[bot] wants to merge 1 commit into
Open
Conversation
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
5.59.0to5.90.1- Changelog5.90.1fix:Thread the PHP SDK's Composer package identity (name +--version) into the IR'sfilesystem publish target for
local-file-systemoutput, so the PHP generator canstamp the real version into
composer.jsoninstead of defaulting to0.0.0.5.90.0feat:Addreffield to thegitlibrary input indocs.yml, allowing users togenerate SDK reference documentation from a specific branch, tag, or commit SHA
instead of only the default branch.
fix:Merge an operation'sparametersfromoverrides.ymlby parameter name instead of by arrayposition, so an override no longer renames or drops whichever parameter happens to sit at that
index. When several parameters share a name,
indisambiguates them, and an override matchingno parameter is appended.
fix:Read a parameter'sdescriptionfrom its inline schema when the parameter object itself doesnot declare one, so descriptions declared inside the schema (as generated by validation
libraries) reach the SDKs and API reference.
5.89.6fix:fern generate --localno longer bumps the magic placeholder version as if it were areal previous version, which produced versions such as
0.0.0-fern-placeholder.0.Placeholder candidates from the diff,
.fern/metadata.jsonand git tags are skipped sothe next resolution source is used instead.
5.89.5fix:Improvefern generate --packageartifacts: TypeScript tarballs are compiled beforepacking so they ship runnable JavaScript (falling back to
tscwhen the package has nobuild script), Java packaging emits a POM with dependency metadata next to the JAR, and
Python host-mode packaging retries in an isolated venv (
python -m build) whenpip wheelfails on the host toolchain.
5.89.4fix:Fix local images and links being published as build-machine filesystem paths (e.g./home/runner/work/.../assets/image.png) when an earlier line on the page contains a literal<in prose or inline code. The markdown scanner treated any<as the start of a tag andskipped ahead to the next
>, dropping every image and link substitution in between.64 additional updates, see more
5.89.3fix:FixCannot resolve endpoint: <operationId> in file <tag>.ymlwhen importing an OpenAPIspec whose
operationIdcontains a dot and does not share a prefix with its tag(e.g.
actions.indexunder theCustom Actionstag). Dotted operation ids are nowcollapsed into a single valid endpoint name, so
x-fern-paginationresolves correctly.Note that this renames the generated method for these endpoints (
actions.indexis nowimported as
actionsIndexrather than verbatim); setx-fern-sdk-method-nameto pin aspecific name.
5.89.2fix:Fix OpenAPI import dropping thenullbranch of aanyOf/oneOfwhen a schemathat contains such a branch is referenced via
$ref. References to these schemasare now correctly treated as nullable, so generators that distinguish optional from
nullable (e.g. TypeScript) emit
| nullinstead of silently dropping it.5.89.1fix:Fixfern docs preview listomitting previews created with a named--id.The command filtered server results with a hex-only pattern that dropped any
preview whose id contained letters outside a-f. Preview deployments are already
filtered server-side, so the redundant client-side filter has been removed.
5.89.0feat:Rename the--packand--pack-modeflags onfern generateto--packageand--package-mode, and add--package-only, which builds the distributable artifact intofern-dist/and removes the generated SDK source, leaving only the package in the outputdirectory.
5.88.0feat:Support declaring OAuth public-client login flows inauth-schemes:type: authorization-code(Authorization Code + PKCE, browser login) and
type: device-code(RFC 8628). These lower tothe new
OAuthConfiguration.authorizationCode/deviceCodeIR variants for public clients(no client secret), carrying the public client id, authorization/device/token URLs, scopes, an
optional loopback
redirect-uri, and PKCE. Thevalid-oauthrule enforces the per-flowrequired fields and that a set
redirect-uriis a loopback address — either127.0.0.1(recommended) or
localhost, with any path — that the generated CLI then binds and sendsverbatim so it matches the redirect registered with the authorization server. Existing
client-credentialsOAuth configurations are unchanged.5.87.0feat:Add thesend-optional-defaultsplayground setting todocs.yml(settable globally orper-endpoint). When enabled, optional API Explorer parameters that declare a default
(or
x-fern-default) are pre-filled and sent from the playground. Defaults to off.5.86.0feat:Add thepreserve-one-of-in-all-ofOpenAPI setting. When enabled, anallOfwhose membersinclude a
oneOf/anyOfis distributed into a union — each variant is the union member mergedwith the remaining
allOfmembers — instead of flattening every variant's properties into asingle object. This makes the variants available to SDKs and renders a variant selector in the
API reference. Defaults to false.
5.85.0feat:fern generate --packnow produces a source zip artifact for Go SDKs infern-dist/(
<output-dir>-source.zip). Go modules have no binary package format, so the zip contains themodule source (excluding
fern-dist/and.git/) and can be shared internally and referencedwith a
replacedirective ingo.mod. The zip is built in-process, so it works identically inhost and docker pack modes without any toolchain.
5.84.0feat:Add a--packflag tofern generate. When generating to the local file system, the CLI nowbuilds distributable package artifacts (npm tarball, Python wheel, JAR, NuGet package, gem,
Composer zip, crate) into a
fern-dist/folder inside each output directory, so SDKs can beshared internally without publishing to a registry. Use
--pack-mode dockerto run thepackaging toolchains inside official Docker images instead of requiring them on the host.
--packalso generates full, packageable projects (pyproject.toml, README.md, etc.) forlocal-file-system outputs so the packaging toolchains have the metadata they need, and
host-mode packaging hides any enclosing git repository so VCS-aware build backends
(e.g. poetry-core) don't silently exclude gitignored output files from the artifact.
5.83.1fix:Fix user-specified OpenRPC examples to use the method's computed endpoint path instead ofappending a hardcoded
/{apiKey}path.5.82.0feat:Addfern org set/get/unset cli-versionto pin the Fern CLI to a versionor a min/max range for your whole organization, keeping every project on a
consistent CLI version.
5.80.5fix:Fix markdown images that specify a title (e.g.) failing to render.The title was treated as part of the image path, so the image was never swapped for its uploaded
file reference.
5.80.4fix:fern generate(cloud generation) withlocal-file-systemoutput now threads thepackage name and version into the IR the same way
fern generate --localdoes. Thisfixes generated SDKs missing the
User-AgentandX-Fern-SDK-Name/X-Fern-SDK-Versionheaders when generating to the local filesystem without the
--localflag. Packagenames configured via generator
config(e.g.package_name,packageJson.name) arenow also resolved on the cloud generation path.
fix:local-file-systemoutput now threads the C# SDK's package identity (from the generator'spackage-idconfig) and the user-provided--versioninto the IR via a newnugetfilesystem publish target, matching the existing npm/pypi/maven/crates/go behavior. This
enables the C# generator to stamp the SDK name/version into
Version.csand the structuredUser-Agentheader.5.80.3fix:Bump @fern-api/generator-cli to 0.9.53. Under--version AUTO, a purely additive Gochange (inserting a new field into a struct) is no longer misclassified as a breaking
MAJOR bump. The generated
explicitFieldsbit-constant reindexing that a fieldinsertion produces is now stripped before AI diff analysis, so real additions stay
MINOR and real removals stay MAJOR.
5.80.2fix:Supportclient-defaultonapi.headersentries in generators.yml. Thegenerators.yml schema previously dropped this field, so global headers with a
client-defaultproduced no client-side default in the generated SDKs. Thefield now flows through to the IR (
clientDefault), so SDKs send the value bydefault when the caller and environment variable do not provide one.
5.80.1fix:Preserve the base schema description on nested fields composed withallOf.When a property merged a
$ref(carrying a description) with an inline schemaadding constraints (e.g.
pattern), the merged validation was kept but theinherited description was dropped from the generated docs/SDKs.
5.80.0feat:Add thelayout.show-nav-availability-badgesdocs.yml setting. When set to true,availability badges (Beta, Deprecated, etc.) render inline next to navigation items
in the sidebar. Defaults to false; the page-header availability badge is unaffected.
5.79.0feat:Add an experimentalexternal-sitemapsoption to theexperimentalblock indocs.yml. It accepts a list of absolute sitemap URLs whose pages are indexed in
search alongside your documentation (tagged to the same domain) but flagged as
third-party so they rank below all first-party docs.
5.78.0feat:The OpenAPI importer now automatically deconflicts path parameters whose names collidewith other request properties (query parameters, headers, or request body properties).
The colliding path parameter's SDK-facing name gets a
PathParamsuffix (e.g. an{idType}path parameter colliding with anidTypebody property becomesidTypePathParam), so such OpenAPI-compliant specs generate without requiring anx-fern-parameter-nameoverride. The wire format is unchanged, since path parameternames never appear on the wire. Explicit
x-fern-parameter-nameoverrides still takeprecedence.
5.77.0feat:Add anignore-tagsOpenAPI setting togenerators.yml. When enabled,operation-level tags are ignored when determining the SDK structure:
endpoints fall back to the root package (or their namespace) and method
names are derived from each operation's
operationId.5.76.0feat:Support webhook signature verification against multiple normalized notification URLforms via
url-normalization(port variants and legacy query encoding) on HMAC webhooksignatures, in both Fern Definition and OpenAPI (
x-fern-webhook-signature).5.75.9fix:Fix multi-API environment grouping (group-multi-api-environments) when a spec'senvironment URLs differ by a dot-separated host segment (e.g.
api.stage.acme.com):the per-API URL key is now derived once per spec instead of per server, so all
environments share a consistent set of URL keys. Grouped environments also keep
their original user-facing names (e.g.
Production) instead of normalizedmatching keys (e.g.
PRD).5.75.8fix:Fix multi-API environment grouping (group-multi-api-environments) when a spec'senvironment URLs differ by a dot-separated host segment (e.g.
api.stage.acme.com):the per-API URL key is now derived once per spec instead of per server, so all
environments share a consistent set of URL keys. Grouped environments also keep
their original user-facing names (e.g.
Production) instead of normalizedmatching keys (e.g.
PRD).5.75.7fix:Bump @fern-api/generator-cli to 0.9.52. Under--version AUTO, the AI-authoredchangelog.mdno longer reports routine version bumps (e.g. theUser-Agent/X-Fern-SDK-Versionheaders) as changed or removed, and the Go/vNmodule suffixis retained in the
X-Fern-SDK-Nameheader value and README install/import samples.5.75.6fix:Resolve the PHP SDK generator's camelCasepackageNameconfig key whencomputing the package name for a generator. This lets local-file-system PHP
generation populate the
User-Agent(and SDK name/version) headers, matchingthe behavior of the other generators' package-identity config keys.
5.75.4fix:fern checknow compiles each docs page's MDX and reports syntax errors such asunclosed components (e.g. a
<Card>without a closing tag). Previously theMDX-validation rule was defined but not registered, so malformed MDX passed
validation and only broke at render/build time. Reported at warning severity to
avoid breaking existing runs on repos with latent MDX issues.
5.75.3fix:Improve OpenAPI example generation performance for schemas with sharedallOfancestors while preserving inherited properties and constraints.
5.75.2fix:The OpenAPI importer now emits a warning when a discriminated union lists a member in itsoneOf/anyOf that is absent from the discriminator mapping. Previously such members were
silently dropped from the generated union, producing an SDK whose wire contract did not match
the spec. The warning names the offending schema so the failure is loud instead of silent.
5.75.1fix:Fixfern docs theme uploadfailing with a 422 "Content has not been uploaded" errorwhen binding theme assets. The content-existence check now uses the org-scoped registry
content path so uploaded content is stored under the same org as the subsequent file bind.
fix:Fixfern docs theme uploadalways targeting the production registry regardless of theCLI build environment. It now falls back to
DEFAULT_FDR_ORIGIN(the origin configured forthe CLI build, e.g. dev) like other CLI services, so a dev-CLI login token is no longer sent
to the production registry (which returned 403 "Failed to resolve organizations").
5.75.0feat:Add a newsmart-casing-digit-word-boundaryoption togenerators.yml. When enabledalongside
smart-casing, snake_case names preserve the word boundary after a digit run(e.g.,
ConversationsV2Configuration→conversations_v2_configuration,Int32Value→int32_value). The option defaults tofalse, restoring thepre-5.70.3 behavior where the digit run stays fused to the following word
(
conversations_v2configuration).5.74.2fix:Fix discriminated union variants that reference a nested oneOf/anyOf beingwrapped in a spurious "value" property. The OpenAPI importer now merges
the nested oneOf variants into a single object with optional fields,
preserving the correct wire format.
5.74.1fix:Bump @fern-api/generator-cli to 0.9.49. Self-hosted push/PR commits created with apersonal access token (
ghp_/github_pat_) are now attributed tofern-api[bot]as author and committer instead of the PAT owner.
5.74.0feat:Add support for webhook signature schemes that transmit a hash of the raw requestbody separately rather than signing the body directly (for example, Twilio's
bodySHA256query parameter for JSON bodies). HMAC webhook signatures now accept abody-hash-bindingwith analgorithm,encoding, and alocation(currently aquery-parameteron the notification URL). The field is threaded through the FernDefinition schema, the IR, and the OpenAPI importer, and validation requires
notification-urlinpayload-format.componentswhen a query-parameter binding isconfigured.
5.72.1fix:Fixdisable-sribeing dropped for remote JS scripts when publishing docsvia the ledger deploy path. The per-script
disableSriflag fromdocs.ymlis now forwarded through the ledger config, so flagged scripts render without
an SRI
integrity(orcrossorigin) attribute.5.72.0feat:Add adisable-srioption to remotejsscripts indocs.yml. When set totrue, the script is rendered without a Subresource Integrity (SRI)
integrityattribute, which is useful for scripts whose contents change over time.
fix:Resolve theauto-generate-idempotency-keyconfig from a generator invocation's resolvedconfigwhen no rawgenerators.ymlblock is present. This restores idempotency-keyauto-generation for synthetic invocations (e.g. the seed test harness) that populate
configdirectly without a
rawblock.5.70.3fix:Fix smart-casing snake_case names dropping the word boundary after a number.Names like
ConversationsV2Configurationnow generateconversations_v2_configurationinstead of
conversations_v2configuration(matching the camelCase and pascalCasevariants). Trailing numbers remain fused, e.g.
applicationV1still generatesapplication_v1.5.70.2fix:Fix multi-API environment grouping (group-multi-api-environments) selecting the wrongbase URL when more than two specs are merged and several specs share identical servers.
Duplicate servers no longer accumulate across merges, so environments with the same name
but different URLs are now grouped into a multi-URL environment instead of collapsing to
the last spec's URL.
5.70.1fix:fern generatewith an explicit--version X.Y.Znow records a version-only entry(version header with an empty description) in the SDK repo's
changelog.md, and existingchangelog entries are preserved across regenerations instead of being wiped.
5.70.0feat:Add an opt-inmask-piisetting underai-searchin docs.yml. When enabled, personallyidentifiable information (PII) in user messages is masked before being sent to Ask Fern.
Disabled by default.
5.69.0feat:Add anapi.settings.auto-generate-idempotency-keyoption ingenerators.ymlthat appliesidempotency-key auto-generation to every generator in the API, so it no longer has to be set
on each generator's
config. A generator's ownconfig.auto-generate-idempotency-keystilloverrides the API-level value. Accepts the same boolean shorthand or
header-name/methodsobject form, and is resolved into the IR (
SdkConfig.idempotencyKeyGeneration) as before.5.68.0feat:Add anauto-generate-idempotency-keygenerator config key. When enabled, theCLI records idempotency-key auto-generation in the IR (
SdkConfig.idempotencyKeyGeneration)so every generator reads a single, canonical setting from the IR instead of each
defining its own config key. Accepts
trueor{ header-name: "Idempotency-Key" }and is stripped from the config forwarded to generators.
5.67.1fix:Fix--version AUTOleaking the literal "AUTO" string into self-hosted generatedSDKs. Both the IR version field (which drives the User-Agent header and
X-Fern-SDK-Version) and the IR publishing config (which drives package.json and
version.ts) now use the language-mapped magic version placeholder
("0.0.0-fern-placeholder") instead of the raw "AUTO" version, so these fields are
stamped with the computed version after post-generation replacement rather than "AUTO".
5.67.0feat:Custom MDX components (experimental.mdx-components) can now import third-partylibraries. The CLI bundles component files with rolldown (via npx) at docs build
time, inlining dependencies resolved from the docs project's node_modules.
5.66.1fix:Validate that a docs instance'surlandcustom-domainshare the same basepath for allsites, not just basepath-aware ones. Navigation links and redirects are generated relative to
the basepath, so the CLI now fails with a clear error when they differ.
5.66.0feat:Resolvex-fern-global-parametersapplicability once at IR-generation time.HttpEndpoint.globalParametersnow holds the fully resolved set of globalparameters that apply to each endpoint (explicit opt-ins plus matching
apply: autoparameters), with body-location parameters gated on theendpoint's request-body schema actually containing the dotted target path.
An explicit opt-in whose request body lacks the target is dropped with a
generation-time warning.
5.65.8fix:Docs configs with apathinput library no longer crashfern docs devandfern generate --docs.parseLibrariesConfigurationnow accepts bothgitand
pathlibrary inputs instead of throwing onpath, so a site whoselibrary docs were generated locally with
fern docs md generate --localcanbe previewed and published.
5.65.7fix:fern checknow fails whendocs.ymlcontains bothnavigationandproducts.These are mutually exclusive (as
navigationandversionsalready were): in amulti-product site the navigation lives in each product's referenced file, so a
top-level
navigationblock silently overrides the products and renders emptynavigation.
5.65.5fix:Improvefern docs devinitial build time by pre-fetching external<Code src="https://..."/>URLsin parallel instead of sequentially, and optimizing image processing with early-exit checks and
streaming scanning. For large docs sites with many external code snippets, this reduces initial
build time from ~57s to ~14s (75% faster).
5.65.4fix:fern checknow errors when a path parameter shares a name with another requestproperty (an inlined request body property, query parameter, or header), including
collisions that only appear after camelCase normalization. These collisions produce
broken or ambiguous generated SDK code; use
x-fern-parameter-name(OpenAPI) or thenameproperty (Fern definition) to deconflict.fix:The OpenAPI importer no longer silently renames a request body property thatcollides with a path parameter. These collisions now surface as
fern checkerrors, forcing explicit deconfliction (e.g. via
x-fern-parameter-name).5.65.3fix:Fix relative .md/.mdx link resolution in translated documentation pages. Previously, translated pages passed an empty markdownFilesToPathName map, so relative markdown links (e.g., ../reference/support-matrix.md) were not resolved to their published slug URLs.5.65.2fix:Improve error messages when ledger docs publishing fails: surface theserver-side validation issues (field paths and messages) so the exact
failing field is visible without needing server-side log access.
5.65.1fix:Improvefern docs devreload performance for content edits (35s → 4-5s).Reduces debounce from 1000ms to 300ms, skips background validation for
markdown-only changes, and writes a generation counter file for the docs
bundle to detect stale cache entries without HTTP round-trips.
5.65.0feat:Add support forx-fern-global-parametersOpenAPI extension. Allows declaringglobal defaults for request body, query, header, and path fields that are set
once at the SDK client level and injected at the declared wire location, with
per-call values winning. IR bumped to 67.10.0.
5.64.3fix:Fix pages losing their sidebar when a top-levellanding-pageshares a slugwith a page in versioned navigation. Reverts a 5.58.0 change: the top-level
landing-pageis no longer copied into each version, and product-levellanding-pageconfig is no longer applied to products inside product groups(restoring pre-5.58.0 rendering).
landing-pagein version files isunaffected.
5.64.2fix:OpenAPI import: an endpoint that declares both a body-bearing 2xx response and a 204 NoContent response now correctly produces an optional success body, even when the 204
erroneously declares a response body. Per RFC 9110 a 204 cannot carry a body, so the
declared 204 body is ignored (with a warning) and the success response type is wrapped
optional. Previously the 204 was dropped and the return type stayed non-optional, so a real
204 (empty body) failed to decode in generated SDKs. Applies to both the legacy and v3
OpenAPI importers.
5.64.1fix:Fix GraphQL namespace types (e.g. Inventory, Geography) being excluded from thetype registry and missing parent operations for query pages. Namespace types are
now registered so their fields render correctly on landing pages.
5.64.0fix:Fix prototargetpath resolution when using remote git sources. Previously the targetwas resolved relative to the workspace instead of the cloned repository, causing
"file missing" errors.
feat:Support commit SHA references in git sourcereffield. Previously only branch namesand tags were supported; commit SHAs now work via fetch+checkout.
5.63.1fix:Prevent --version AUTO from embedding literal 'AUTO' in generated SDK code during remote generation. The magic placeholder is now substituted before IR generation in the remote path, matching the local generation fix.5.63.0feat:Extend dynamic IR OAuth types with custom properties and populate them inDynamicSnippetsConverter, enabling dynamic snippet generators to include
custom OAuth token endpoint request parameters in generated code examples.
5.62.2fix:Strip CLI-only config keys (e.g.user-agent) from the custom configbefore forwarding to generator containers, preventing strict validation
errors in generators that reject unknown keys.
5.62.1fix:Fix float primitive types rendering as 'double' in documentation. Float types now correctly render as 'float'.5.62.0feat:Add--generate-testsflag tofern generateto enable test file generationeven when outputting to a local file system. Previously, tests were only generated
for GitHub output modes.
5.61.0feat:Adduser-agentgenerator config option that accepts a template string forthe User-Agent header. Supported placeholders:
{packageName},{version},{language},{generatorVersion},{organization},{apiName}. When absent,defaults to
{packageName}/{version}(current behavior, non-breaking).5.60.0feat:Addmcpoption topage-actionsindocs.yml. When set tofalse, the MCP serverendpoint is disabled, its URL is omitted from
llms.txtand agent prompts, and the"Connect to Claude Code" / "Connect to Cursor" buttons are hidden.
fix:Addpayload-formatsupport for asymmetric webhook signature verification,allowing the timestamp and other components to be included in the signed
payload. Previously, only the raw body was signed for asymmetric webhooks,
making the timestamp tolerance check ineffective against replay attacks.
Requested by: Fern Dashboard (fern)