跳到导航

从 Fern Definition 导出到 OpenAPI

以 Markdown 格式查看

为了防止锁定在 Fern Definition 格式中,您可以随时使用 fern export 命令将您的 API 定义导出为 OpenAPI 3.1。

如果您在 fern/apis/ 文件夹中定义了多个 API,请使用 --api 指定要导出的 API。

终端
fern export path/to/openapi.yml
fern export path/to/openapi.json
# 指定要导出的 API
fern export --api public-api path/to/openapi.yml