Imports in Fern Definition

View as Markdown

Fern Definition isn’t recommended for new customers and Fern isn’t accepting feature requests for this format. It remains supported for existing users.

Imports allow you to reference types and errors from other files.

person.yml
1types:
2 Person: ...
family.yml
1imports:
2 person: ./path/to/person.yml
3types:
4 Family:
5 properties:
6 people: list<person.Person> # use an imported type

Note that you can only import files that exist in your Fern Definition (i.e., in the same definition/ folder).