From c6b0721d4329065a8dc8b6446353c8ca1eddfae0 Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Wed, 9 Jul 2025 12:12:27 -0400 Subject: [PATCH 1/2] add go quickstart draft --- fern/products/sdks/overview/go/quickstart.mdx | 87 ++++++++++++++++++- 1 file changed, 85 insertions(+), 2 deletions(-) diff --git a/fern/products/sdks/overview/go/quickstart.mdx b/fern/products/sdks/overview/go/quickstart.mdx index e3162430e..269aac348 100644 --- a/fern/products/sdks/overview/go/quickstart.mdx +++ b/fern/products/sdks/overview/go/quickstart.mdx @@ -3,6 +3,89 @@ title: Go Quickstart description: Get started quickly with the Fern Go SDK. --- -# Go Quickstart + -Follow these steps to quickly get up and running with the Fern Go SDK. \ No newline at end of file +Generate a Go SDK by following the instructions on this page. + + + + + ### Initialize the Fern Folder + + You can use either the OpenAPI definition, AsyncAPI definition, or Fern + Definition to generate your SDK. + + + + + + + + + + + 2. Add the config option `outputSourceFiles: true` to + `generators.yml`. This ensures your SDK contains source files in + your preferred SDK language instead of compiled output. + + ```yaml {11-12} + # yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json + default-group: local + groups: + local: + generators: + - name: fernapi/fern-typescript-node-sdk + output: + location: local-file-system + path: ../sdks/typescript + version: + config: + outputSourceFiles: true + ``` + + `fern init` creates a default configuration that includes the + TypeScript Node SDK generator. The `local` group containing this + generator only generates if you run fern generate without specifying a + group, or if you explicitly target it with `fern generate --group + local`. In subsequent steps, you'll add an additional generator for your + preferred SDK language. + + + + + + +### Add the SDK generator + +Add the Go SDK generator: + +```bash +fern add fern-go-sdk --group sdk +``` + +This command adds the following to `generators.yml`: + +```yaml + sdk: + generators: + - name: fernapi/fern-go-sdk + version: + output: + location: local-file-system + path: ../sdks/go +``` + + + +```bash +fern/ # created in step 1 +sdks/ # created by fern generate --group sdk +├─ go + ├─ __init__.py + ├─ client.py + ├─ core/ + └─ imdb/ # or the name of your API + ├─ errors/ + └─ types/ +``` + From 5642478ba352179be2cee7e57cccfb153d90e592 Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Thu, 10 Jul 2025 13:17:18 -0400 Subject: [PATCH 2/2] update go page --- fern/products/sdks/overview/go/quickstart.mdx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/fern/products/sdks/overview/go/quickstart.mdx b/fern/products/sdks/overview/go/quickstart.mdx index 55be2e21a..d1eeace0b 100644 --- a/fern/products/sdks/overview/go/quickstart.mdx +++ b/fern/products/sdks/overview/go/quickstart.mdx @@ -34,7 +34,7 @@ Generate a Go SDK by following the instructions on this page. groups: local: generators: - - name: fernapi/fern-typescript-node-sdk + - name: fernapi/fern-typescript-sdk output: location: local-file-system path: ../sdks/typescript @@ -44,7 +44,7 @@ Generate a Go SDK by following the instructions on this page. ``` `fern init` creates a default configuration that includes the - TypeScript Node SDK generator. The `local` group containing this + TypeScript SDK generator. The `local` group containing this generator only generates if you run fern generate without specifying a group, or if you explicitly target it with `fern generate --group local`. In subsequent steps, you'll add an additional generator for your @@ -81,11 +81,7 @@ This command adds the following to `generators.yml`: fern/ # created in step 1 sdks/ # created by fern generate --group sdk ├─ go - ├─ __init__.py - ├─ client.py ├─ core/ - └─ imdb/ # or the name of your API - ├─ errors/ - └─ types/ + └─ resources/ ``` \ No newline at end of file