4.47.0
(feat): Add fern sdk preview command for publishing preview SDK packages.
Generates an SDK via Docker and publishes it to the Fern preview
registry (npm.buildwithfern.com). Outputs an npm install alias
command so consumers can test the preview with zero import changes.
4.46.7
(fix): Fix OpenAPI-to-Fern conversion using wire names instead of SDK names
(from x-fern-parameter-name) for query parameter conflict detection.
When a query parameter has a name override, the override name is now used
to check for conflicts with body properties, preventing unnecessary body
property renames.
4.46.6
(fix): Fix tag description pages not being generated when a tag reference in
docs.yml uses a title override. Tags with title overrides are parsed
as Package type items, but the #convertPackage method did not call
createTagDescriptionPageId, so the overview page was silently dropped.
The method now falls back to creating a tag description page when no
explicit overview is provided.
4.46.5
(fix): Internal improvements to GitHub integration for server-side operations.
4.46.4
(fix): Fix OAuth client-credentials auth from generators.yml being converted to
bearer token instead of proper OAuth in the new OpenAPI parser. The
convertApiAuth in ir-utils had a TODO stub that fell back to bearer auth
for OAuth schemes. A post-processing step in OpenAPIConverter now resolves
OAuth endpoint references after paths are converted, constructing the full
AuthScheme.oauth with resolved endpoint and property references.
4.46.3
(fix): Fix OpenAPI-to-Fern conversion producing malformed discriminated union
definitions when x-fern-discriminator-context is set. The context
value was placed as a sibling of discriminant instead of being nested
inside it, so the information was silently lost during IR generation.
This caused generated SDKs to always use the default discriminator context
of data and never use the alternate protocol which is used in SSE when
the SSE envelope’s event field is the discriminant.
4.46.2
(fix): Fix Go SDK auto-versioning returning incorrect versions for modules with
major version >= 2. The Go module proxy treats github.com/owner/repo and
github.com/owner/repo/v2 as separate modules, but getGoPackageName()
only constructed the base path without the /vN suffix. This caused the
version resolver to find ancient v0.x versions instead of the current v2.x+
versions, producing wrong sdkVersion values in .fern/metadata.json and
incorrect module paths in generated code. The Go proxy lookup now probes
/v2 through /v10 in parallel to discover the highest published major
version.
4.46.0
(feat): Add check.rules to docs.yml to configure severities for selected docs
validation rules, including OpenAPI example validation, broken links,
non-component refs, local refs, circular redirects, and docs endpoint checks.
Deprecate the --broken-links and --strict-broken-links CLI flags in favor
of configuring broken link behavior in docs.yml.
4.48.0
(feat): Automatically unlock docs deploy when the CLI exits early or crashes.
If the process receives SIGINT or SIGTERM after starting a docs publish,
the CLI now calls the FDR unlock endpoint to release the deploy lock so
subsequent publishes are not blocked.
4.46.1
(fix): Fix tag description pages incorrectly escaping curly braces and angle
brackets inside fenced code blocks and inline code. The blanket
character escaping has been removed in favor of the downstream MDX
sanitizer which correctly handles special characters only where needed.
4.45.0
(feat): Add validation for OpenAPI specs that contain non-ASCII characters
(e.g. emojis) in tag names or --- frontmatter delimiters in endpoint
descriptions. Tag names with non-ASCII characters end up in URL paths
and HTTP headers which only support ASCII, causing ERR_INVALID_CHAR
errors at runtime. Descriptions with --- delimiters are interpreted
as YAML frontmatter by the docs renderer, causing parsing failures and
500 errors on generated docs sites. Both fern check and docs
generation now surface these as errors so users can fix their specs
before publishing.
4.44.1
(fix): Fix OpenAPI importer discarding response body examples when the 2xx
response has examples but no schema. The synthetic empty-object
fallback now preserves examples and example from the original
media type object, so example names, response bodies, and ordering
are correctly carried through to the IR.
4.44.0
(feat): Nest tabs configuration under theme.tabs as an object with style,
alignment, and placement properties. theme.tabs: bubble (string)
is still supported for backward compatibility. The layout.tabs-placement
field is preserved for backward compat. Tab alignment is only available
via theme.tabs.alignment. Warn when sidebar placement is combined with
center alignment since centering is only supported for header tabs.
4.43.4
(fix): Thread endpoint ID through dynamic snippet generators to differentiate
generated snippets by endpoint.
4.43.3
(fix): Include version number in the Gradle installation snippet for Java SDKs
in generated README.md files. Previously only the Maven snippet included
the version.
4.43.2
(fix): Fix OpenAPI importer to produce optional response types when an endpoint
has both a 200 (with body) and a 204 (No Content) response. Previously the
204 response was silently ignored, causing generators to emit non-nullable
return types and attempt deserialization on empty bodies. Both the v3 parser
and v3.1 importer paths are fixed.
4.43.1
(fix): Fix OpenAPI importer stripping the discriminant property from shared
allOf base schemas when they are used by oneOf discriminated union
variants. Previously, if a base schema like Error was extended by both
union members and standalone schemas, the discriminant property (e.g.
code) would be removed from the base, causing downstream fern check
errors on the union variant types.
4.42.1
(fix): Strip MDX comments ({/* ... */}) from markdown.
4.43.0
(feat): Add fern docs md check command to validate MDX syntax in documentation files.
The command parses all MDX files referenced in docs.yml and reports syntax
errors with accurate file paths and line:column numbers, accounting for
frontmatter offsets.
4.42.0
(feat): Add --skip-fernignore flag to fern generate. When set, the
.fernignore file is ignored so that no generated files are excluded,
effectively overwriting all files in the output. For remote generation,
an empty .fernignore is uploaded. For local generation, the existing
.fernignore in the output directory is skipped. This is useful when
you want to ensure a clean generation without any .fernignore exclusions.
4.41.0
(feat): Support hidden and noindex frontmatter in folder-based navigation.
Pages with hidden: true or noindex: true in their frontmatter are now
respected when using folder: entries in docs.yml. Sections whose
index.mdx has hidden: true are also hidden.
4.40.0
(feat): Exclude files and folders whose names start with _ from folder-based
navigation. This follows the convention used by other documentation
platforms (e.g. Docusaurus) where prefixing a file or directory with _
hides it from the generated navigation tree.
4.39.0
(feat): Add --require-env-vars flag to fern generate. Use --no-require-env-vars
to substitute empty strings for undefined environment variables instead of
causing an error. Defined environment variables are still resolved normally.
This is useful for local development when registry credentials are not needed.
4.38.1
(fix): Fix incorrect repository URL in generated package metadata when the
GitHub uri in generators.yml is a full URL (e.g.
https://github.com/owner/repo). The naive split("/") produced
owner = "https:" and repo = "", generating broken URLs like
git+https://github.com/https:/. Both getPublishConfig() and
newDummyPublishOutputConfig() now use the existing parseRepository()
utility, which correctly handles full URLs, shorthand owner/repo,
and custom GitHub domains.
4.38.0
(feat): Auto-detect CI environment (GitHub Actions, GitLab CI, Bitbucket Pipelines)
during fern generate --docs and send source metadata (repository, run ID,
commit SHA, branch, actor) to FDR via the X-CI-Source header. This enables
the deployment log UI to link docs deployments back to the CI workflow that
triggered them.
4.37.12
(fix): Scope allOf property merge to inline elements only in ObjectSchemaConverter and use first-match-wins for parent property resolution in V3 importer to match legacy behavior
4.37.11
(fix): Fix OpenAPI-to-IR conversion to propagate schema-level descriptions to inlined request
bodies. Previously, the InlinedRequestBody.docs field was only populated from the
requestBody-level description, ignoring the referenced schema’s own description.
Now falls back to typeDeclaration.docs from the converted schema when the requestBody
description is missing.
4.37.10
(fix): Guard concurrent npm install -g fern-api invocations with an async lock to prevent race conditions during protobuf toolchain setup
4.37.9
(fix): Fix AsyncAPI v3 parser to read WebSocket query parameters and headers
from channel.bindings.ws.query and channel.bindings.ws.headers, which
is the standard location per the AsyncAPI WebSocket bindings spec.
Previously the v3 parser only read from channel.parameters, which the
AsyncAPI spec reserves for path parameters. This caused WebSocket connect
options classes (e.g. ConnectOptions) to be missing from generated SDKs
when specs used the standard bindings location.
4.37.8
(fix): Map magic placeholder version to PEP 440-compatible format for Python
generators during local auto-versioning. Poetry validates versions during
generation and rejects semver pre-release tags with hyphens. Python
generators now receive 0.0.0.dev0 instead of 0.0.0-fern-placeholder.
4.37.7
(fix): Fix getLatestRelease fetching all GitHub releases when falling back
from a semver prerelease tag. The fallback now uses a single
listReleases API call (up to 100 results) instead of paginating
through every release in the repository.
4.37.5
(fix): Always prefer the auto-downloaded fern fork of protoc-gen-openapi over
an arbitrary protoc-gen-openapi binary found on PATH. Users with the
original Google/gnostic protoc-gen-openapi installed would encounter
no such flag -flatten_oneofs errors because that version does not
support fern-specific plugin options. The CLI now downloads the fern fork
first and only falls back to PATH if the download fails. Set
FERN_USE_LOCAL_PROTOC_GEN_OPENAPI=true to force the PATH version
(e.g. for testing a custom build).
(chore): Add hidden install-dependencies CLI command that pre-downloads buf
and protoc-gen-openapi binaries into the Fern cache. CI workflows now
use this command instead of bufbuild/buf-setup-action and
go install protoc-gen-openapi, removing the Go toolchain dependency
from CI.
4.37.4
(fix): Sanitize preview IDs before sending to FDR API to ensure valid DNS subdomains.
4.37.3
(fix): Sanitize preview IDs passed via --id to produce valid DNS subdomain
labels.
4.37.2
(fix): Remove cli-progress from the published fern-api package’s runtime
dependencies. The package is a pure JS library that is already bundled
into the CLI output by tsup, so it does not need to be installed
separately at runtime.
4.37.6
(fix): Fix Go SDK auto-versioning producing malformed code with duplicate imports
and mixed module paths during major version bumps (e.g. v1 to v2). The magic
placeholder version now uses major version 0, which avoids polluting generated
code with artificial /vN suffixes. After auto-versioning computes the real
version, the correct /vN suffix is added to go.mod and all import paths
when the major version is 2 or higher. Also filters Go module path suffix
changes from the AI diff analysis to prevent version-bump noise.
4.37.1
(fix): Optimize protobuf buf generate to reuse a single working directory
across all proto files. Instead of creating a new temp dir, copying
the proto root, checking binaries, and resolving deps for every file,
setup is done once and only buf generate <target> runs per file.
The two buf generate passes (protoc-gen-openapi and protoc-gen-fern)
also now run concurrently.
4.37.0
(feat): Auto-download buf CLI binary from GitHub Releases when it is not found
on PATH. This eliminates the need for users to pre-install buf before
running proto-based SDK generation. The binary is cached at ~/.fern/bin/
with versioning, filesystem locking, and atomic file operations.
4.36.1
(fix): Fix getLatestRelease returning semver prerelease tags (e.g.
0.0.0-dev-babaf54d) as the latest release. When GitHub’s “latest
release” API returns a tag that is a semver prerelease, the CLI now
falls back to scanning recent releases for the first stable
(non-prerelease, non-draft) version. This prevents
computeSemanticVersion from computing incorrect next versions.
4.36.0
(feat): Auto-download protoc-gen-openapi binary from GitHub Releases when it is
not found on PATH. This eliminates the need to install Go and compile
protoc-gen-openapi from source on every CI run, reducing proto-based
SDK generation setup time by ~40 seconds.
4.34.1
(fix): Include available group names in the error message when no group is
specified and no default-group is set. The error now lists all groups
defined in generators.yml so users can quickly pick the right
--group value.
4.35.0
(feat): Add --id flag to fern generate --docs --preview for stable preview
URLs. When --id <name> is provided, the preview domain uses the given
identifier instead of a random UUID, so subsequent runs with the same ID
overwrite the previous preview and the URL stays constant. In non-CI
environments the CLI checks whether the preview already exists and
prompts for confirmation before overwriting (skip with --force).
4.34.0
(feat): Add infer-default-environment API definition setting. When set to false,
the OpenAPI importer will not automatically designate the first server as the
default environment, requiring SDK users to explicitly provide a base URL.
Defaults to true to preserve existing behavior.
4.33.0
(feat): Add enums-coerceable-to-literals option for coerce-consts-to, and make
it the new default. This behaves like enums (const values become
single-element enums) but allows coerce-enums-to-literals to transitively
coerce them to literals, which is consistent with past default behavior. The
existing enums option continues to block this transitive coercion.
4.32.2
(fix): Fix custom LICENSE files not being included in SDK output when using
fern generate --local. The license path (e.g. ../../LICENSE) was
resolved relative to fern.config.json instead of generators.yml,
causing the file to not be found in multi-API workspace layouts where
these files are in different directories.
4.32.1
(fix): Downgrade the no-openapi-v2-in-docs validation rule from an error to a
warning. Fern supports OpenAPI 2.0 (Swagger) specs in docs generation, so
fern check no longer fails when Swagger 2.0 specs are present.
4.32.0
(feat): Add support for the x-fern-sdk-method-name extension on AsyncAPI v2
publish and subscribe operations. Users can now customize the
generated SDK method name (e.g., changing sendPublish to send)
without migrating to AsyncAPI v3.
4.31.3
(fix): Enable WebSocket auth in AsyncAPI by populating IR auth schemes. The AsyncAPI
converter now converts security schemes from both generators.yml auth overrides
and native AsyncAPI spec securitySchemes into IR AuthScheme objects, so the docs
explorer correctly renders auth forms for WebSocket endpoints.
4.31.1
(fix): Fix x-fern-streaming with stream-condition emitting the condition field
as an optional boolean instead of a required literal in split request types.
When the source property was nullable (type: [boolean, "null"]), the spread
order allowed the original property to overwrite the literal overrides.