生成 SDK
生成 SDK
生成 SDK
按照本页面的说明生成 Go SDK。
Initialize the fern folder with your existing OpenAPI specification. Specify your organization name using the --organization flag.
OpenAPI accepts both JSON and YAML formats.
This creates a fern folder in your current directory.
Check that your API definition is valid, and fix errors before proceeding:
运行以下命令生成您的 SDK:
如果您有多个 API,请使用 --api 标志指定要生成的 API:
This creates a sdks folder in your current directory. The resulting folder structure looks like this:
Fern uses a multi-repo structure: your source repository contains the fern/ folder, and each SDK gets its own separate repository.
fern/ folder if you don’t have one already (e.g., your-org/your-api-definitions).your-org/your-api-go-sdk).