A full Fern project demonstrating OpenAPI-based docs, SDK generation (Go + TypeScript), a test server, and test apps that exercise the generated SDKs.
├── fern/
│ ├── fern.config.json # Fern org config
│ ├── generators.yml # SDK generator config (Go + TS, local output)
│ ├── docs.yml # Docs site config with custom theming
│ ├── openapi/
│ │ └── openapi.yml # Taskboard API — OpenAPI 3.1 spec
│ └── docs/pages/ # MDX documentation pages
├── sdks/
│ ├── go/ # Generated Go SDK
│ └── typescript/ # Generated TypeScript SDK
├── test-server/
│ └── server.ts # Bun server implementing the full API spec
├── test-apps/
│ ├── go-app/ # Test app using the Go SDK
│ └── bun-app/ # Test app using the TypeScript SDK (Bun)
├── scripts/
│ ├── test-all.sh # Run server + both test apps end-to-end
│ ├── run-server.sh # Start the test server
│ ├── test-bun.sh # Run the Bun/TypeScript test app
│ └── test-go.sh # Run the Go test app
- Node.js 18+
- Fern CLI (
npm install -g fern-api) - Bun (
curl -fsSL https://bun.sh/install | bash) - Go 1.21+
cd fern
fern generate --group go-sdk
fern generate --group ts-sdk./scripts/test-all.shThis starts the test server, runs the Bun test app, then the Go test app, and shuts down the server when done.
Start the server in one terminal:
./scripts/run-server.shThen run either test app in another:
./scripts/test-bun.sh
./scripts/test-go.shcd fern
fern docs devcd fern
fern generate --docsThe Taskboard API is a task management REST API with:
| Resource | Endpoints |
|---|---|
| Tasks | List, Create, Get, Update, Delete |
| Projects | List, Create, Get, Delete |
Authentication via Bearer token. Full spec in fern/openapi/openapi.yml.