Fern Definition isn’t recommended for new customers and Fern isn’t accepting feature requests for this format. It remains supported for existing users.
Fern allows you to import other APIs into your API.
This is often useful if:
The first step is to register the API you want to depend on. To do this, use
the register command:
To add a dependency on another API, you must add a dependencies.yml to declare which
APIs you wish to depend on.
Your dependencies.ymlhas a list of all the APIs you wish to depend:
Next, you need create a folder in your Fern Definition to house the dependency. Inside the folder, create a special file
__package__.yml which specifies the dependency and version you want to add.
When you generate the SDK with fern generate, the __package__.yml file will
effectively be replaced with the API you’re depending on.