API version
Fern supports two complementary ways to express the version of your API. info.version records a single version string that flows through to your generated docs and downloadable spec. x-fern-version defines a header-based version scheme for APIs that dispatch behavior based on a version header (similar to Stripe’s Stripe-Version).
info.version
Fern preserves the info.version field from your OpenAPI specification. Any format is supported, including SemVer (1.2.3), CalVer (2026-06-23), or custom strings.
The value carries through to the downloadable OpenAPI spec served from your docs site and to Markdown output on API Reference pages.
x-fern-version
To define a header-based API version scheme, use x-fern-version:
This generates a version selector dropdown in the API Reference and attaches the chosen version as a request header on each call.