Adding custom code
These pages cover SDK generation configured with generators.yml. New projects use sdk-config.yml, so see the Current version of this page for up-to-date guidance. To move an existing project, follow the SDK Config migration guide, which walks through fern sdk migrate, and review the sdk-config.yml reference.
This feature is available only for the Enterprise plan. To get started, reach out to support@buildwithfern.com.
This page covers how to add custom logic, methods, and dependencies to your Ruby SDK.
Adding custom logic
To get started adding custom code:
Adding custom SDK methods
Fern also allows you to add custom methods to the SDK itself (e.g.
client.my_method() ) by inheriting the Fern generated client and then
extending it.
Update generators.yml configuration
Name your Fern-generated client something like BaseClient to reflect that this client will be extended.
Adding custom dependencies
To add gems that your custom code requires, update your generators.yml.