OpenAPI generators.yml reference
Configure how your OpenAPI specification is processed and transformed into SDKs using the generators.yml
configuration file.
openapi
Path to the OpenAPI specification file.
origin
URL of the API definition origin for polling updates.
overrides
Path to OpenAPI overrides file.
namespace
Namespace for the specification.
settings
OpenAPI-specific generation settings.
title-as-schema-name
Whether to use the titles of schemas within an OpenAPI definition as the names of types within Fern.
inline-path-parameters
Whether to include path parameters within the generated in-lined request.
inline-all-of-schemas
Whether to inline allOf
schemas during code generation. When true, Fern recursively visits allOf
schema definitions and inlines them into the child schema. When false, allOf
schemas are extended through inheritance.
Enabling this setting allows child schemas to override parent property requirements. For example, a child schema can mark a parent’s required property as optional. Without this setting, Fern ignores the child schema’s optional declaration and preserves the parent schema’s requirement instead.
prefer-undiscriminated-unions-with-literals
Whether to prefer undiscriminated unions with literals.
only-include-referenced-schemas
Whether to only include schemas referenced by endpoints in the generated SDK (tree-shaking).
respect-nullable-schemas
Preserves nullable schemas in API definition settings. When false, nullable schemas are treated as optional.
object-query-parameters
Enables parsing deep object query parameters.
respect-readonly-schemas
Enables exploring readonly schemas in OpenAPI specifications.
respect-forward-compatible-enums
Enables respecting forward compatible enums in OpenAPI specifications.
use-bytes-for-binary-response
Enables using the bytes
type for binary responses. Defaults to file stream.
default-form-parameter-encoding
The default encoding of form parameters. Options: form
, json
.
additional-properties-defaults-to
Configure what additionalProperties
should default to when not explicitly defined on a schema.
type-dates-as-strings
If true, convert strings with format date to strings. If false, convert to dates.
preserve-single-schema-oneof
If true, preserve oneOf structures with a single schema. If false, unwrap them.
filter.endpoints
Endpoints to include in the generated SDK (e.g., “POST /users”).
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.
example-generation.response.max-depth
Controls the maximum depth for which optional properties will have examples generated in responses.