generators.yml Configuration Schema
The generators.yml
file configures how Fern generates SDKs from your API
specification, including which languages to generate, where to publish them, and
how to customize each SDK. This document describes the complete configuration
schema for generators.yml
.
auth-schemes
Configures authentication methods for your API.
auth-schemes
api
api
Defines the API specification (OpenAPI, AsyncAPI, etc.) and how to parse it.
General Configuration Options
api.specs
List of API specifications or Conjure configuration.
api.auth
Authentication configuration for the API.
api.headers
Default headers to include with API requests.
api.environments
Environment configurations for different deployment targets.
Specification Types
OpenAPI
specs[].openapi
Path to the OpenAPI specification file.
specs[].origin
URL of the API definition origin for polling updates.
specs[].overrides
Path to OpenAPI overrides file.
specs[].namespace
Namespace for the specification.
specs[].settings
OpenAPI-specific generation settings.
settings.title-as-schema-name
Whether to use the titles of schemas within an OpenAPI definition as the names of types within Fern.
settings.inline-path-parameters
Whether to include path parameters within the generated in-lined request.
settings.prefer-undiscriminated-unions-with-literals
Whether to prefer undiscriminated unions with literals.
settings.only-include-referenced-schemas
Whether to only include schemas referenced by endpoints in the generated SDK (tree-shaking).
settings.respect-nullable-schemas
Preserves nullable schemas in API definition settings. When false, nullable schemas are treated as optional.
settings.object-query-parameters
Enables parsing deep object query parameters.
settings.respect-readonly-schemas
Enables exploring readonly schemas in OpenAPI specifications.
settings.respect-forward-compatible-enums
Enables respecting forward compatible enums in OpenAPI specifications.
settings.use-bytes-for-binary-response
Enables using the bytes
type for binary responses. Defaults to file stream.
settings.default-form-parameter-encoding
The default encoding of form parameters. Options: form
, json
.
settings.additional-properties-defaults-to
Configure what additionalProperties
should default to when not explicitly defined on a schema.
settings.type-dates-as-strings
If true, convert strings with format date to strings. If false, convert to dates.
settings.preserve-single-schema-oneof
If true, preserve oneOf structures with a single schema. If false, unwrap them.
settings.filter.endpoints
Endpoints to include in the generated SDK (e.g., “POST /users”).
settings.example-generation.request.max-depth
Controls the maximum depth for which optional properties will have examples generated. A depth of 0 means no optional properties will have examples.
settings.example-generation.response.max-depth
Controls the maximum depth for which optional properties will have examples generated in responses.
AsyncAPI
specs[].asyncapi
Path to the AsyncAPI specification file.
specs[].origin
URL of the API definition origin for polling updates.
specs[].overrides
Path to AsyncAPI overrides file.
specs[].namespace
Namespace for the specification.
specs[].settings
AsyncAPI-specific generation settings.
settings.message-naming
What version of message naming to use for AsyncAPI messages. Options: v1
, v2
.
settings.title-as-schema-name
Whether to use the titles of schemas within an AsyncAPI definition as the names of types within Fern.
settings.respect-nullable-schemas
Preserves nullable schemas in API definition settings. When false, nullable schemas are treated as optional.
Protocol Buffers
specs[].proto
Protocol Buffers configuration.
specs[].proto.target
Path to the target .proto
file (e.g., proto/user/v1/user.proto
).
specs[].proto.root
Path to the .proto
directory root (e.g., proto
).
specs[].proto.overrides
Path to the overrides configuration.
specs[].proto.local-generation
Whether to compile .proto
files locally. Defaults to remote generation.
OpenRPC
specs[].openrpc
Path to the OpenRPC specification file.
specs[].overrides
Path to OpenRPC overrides file.
specs[].namespace
Namespace for the specification.
Conjure
specs.conjure
Path to Conjure specification file.
whitelabel
Branding/publishing configuration (like GitHub credentials for publishing).
whitelabel
whitelabel.github
whitelabel.github.username
whitelabel.github.email
whitelabel.github.token
metadata
Package metadata like description and authors that gets included in generated SDKs.
metadata
metadata.description
metadata.authors
metadata.authors[].name
metadata.authors[].email
readme
Controls what goes into the generated README files across all SDKs.
readme
readme.bannerLink
readme.introduction
readme.apiReferenceLink
readme.defaultEndpoint
readme.defaultEndpoint.method
readme.defaultEndpoint.path
readme.defaultEndpoint.stream
readme.features
default-group
Which group to use when none is specified.
default-group
groups
Organizes different sets of generators (like “production” vs “staging” vs “internal”)
groups
groups.{groupName}
groups.{groupName}.audiences
groups.{groupName}.generators
groups.{groupName}.metadata
groups.{groupName}.reviewers
Generator Configuration
groups.{groupName}.generators[].name
groups.{groupName}.generators[].version
groups.{groupName}.generators[].output
groups.{groupName}.generators[].github
groups.{groupName}.generators[].config
groups.{groupName}.generators[].metadata
groups.{groupName}.generators[].keywords
groups.{groupName}.generators[].snippets
groups.{groupName}.generators[].ir-version
groups.{groupName}.generators[].smart-casing
groups.{groupName}.generators[].api
groups.{groupName}.generators[].disable-examples
Output Locations
NPM Output
groups.{groupName}.generators[].output.location
groups.{groupName}.generators[].output.url
groups.{groupName}.generators[].output.package-name
groups.{groupName}.generators[].output.token
Maven Output
groups.{groupName}.generators[].output.location
groups.{groupName}.generators[].output.url
groups.{groupName}.generators[].output.coordinate
groups.{groupName}.generators[].output.username
groups.{groupName}.generators[].output.password
groups.{groupName}.generators[].output.signature
groups.{groupName}.generators[].output.signature.keyId
groups.{groupName}.generators[].output.signature.password
groups.{groupName}.generators[].output.signature.secretKey
PyPI Output
groups.{groupName}.generators[].output.location
groups.{groupName}.generators[].output.url
groups.{groupName}.generators[].output.package-name
groups.{groupName}.generators[].output.token
groups.{groupName}.generators[].output.username
groups.{groupName}.generators[].output.password
groups.{groupName}.generators[].output.metadata
groups.{groupName}.generators[].output.metadata.keywords
groups.{groupName}.generators[].output.metadata.documentation-link
groups.{groupName}.generators[].output.metadata.homepage-link
NuGet Output
groups.{groupName}.generators[].output.location
groups.{groupName}.generators[].output.url
groups.{groupName}.generators[].output.package-name
groups.{groupName}.generators[].output.api-key
RubyGems Output
groups.{groupName}.generators[].output.location
groups.{groupName}.generators[].output.url
groups.{groupName}.generators[].output.package-name
groups.{groupName}.generators[].output.api-key
Postman Output
groups.{groupName}.generators[].output.location
groups.{groupName}.generators[].output.api-key
groups.{groupName}.generators[].output.workspace-id
groups.{groupName}.generators[].output.collection-id
Local File System Output
groups.{groupName}.generators[].output.location
groups.{groupName}.generators[].output.path
GitHub Configuration
groups.{groupName}.generators[].github.repository
groups.{groupName}.generators[].github.mode
groups.{groupName}.generators[].github.branch
groups.{groupName}.generators[].github.license
groups.{groupName}.generators[].github.license.MIT
groups.{groupName}.generators[].github.license.Apache
groups.{groupName}.generators[].github.license.custom
groups.{groupName}.generators[].github.reviewers
Generator Metadata
groups.{groupName}.generators[].metadata.package-description
groups.{groupName}.generators[].metadata.email
groups.{groupName}.generators[].metadata.reference-url
groups.{groupName}.generators[].metadata.author
groups.{groupName}.generators[].metadata.license
Snippets Configuration
groups.{groupName}.generators[].snippets.path
API Settings Override
groups.{groupName}.generators[].api.auth
groups.{groupName}.generators[].api.settings
reviewers
Who should review generated code.