Overview of AsyncAPI extensions
Fern supports a variety of AsyncAPI extensions that enhance your API specification and generate higher-quality SDKs. You can apply these extensions in two ways: by overlaying them in separate override files or by embedding them directly in your AsyncAPI specification.
Available extensions
The table below shows all available extensions and links to detailed documentation for each one.
Request a new extension
If there’s an extension you want that doesn’t already exist, file an issue to start a discussion about it.
Overlaying extensions
Overlaying extensions allows you to keep your original API specification clean while adding Fern-specific customizations in a separate file. This approach is ideal when you’re using multiple tools that consume your API spec, or when you want to maintain a pristine source specification.
To use overlays, specify an overrides file in your generators.yml
configuration.
The example below shows how to overlay SDK naming extensions. The first tab shows the generators.yml
configuration that references an overrides file, the second tab contains the overrides file with Fern extensions, and the third tab shows the final result when the extensions are applied to your original API specification.
Embedding extensions
Instead of using overlay files, you can embed Fern extensions directly within your API specification or source code. This approach is useful when you want to keep extensions close to your API definitions or when using frameworks that support custom extensions.
Direct embedding
You can add Fern extensions directly to your API specification: