Export from Fern Definition to OpenAPI

To prevent lock-in to the Fern Definition format, you can export your API definition to OpenAPI 3.1 at any time using the fern export command.

If you have multiple APIs defined in your fern/apis/ folder, use --api to specify which API to export.

terminal
$fern export path/to/openapi.yml
>fern export path/to/openapi.json
>
># Specify API to export
>fern export --api public-api path/to/openapi.yml