Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions fern/products/sdks/generators/ruby/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,18 @@ Generate a Ruby SDK with Fern. Follow the [Ruby SDK quickstart](https://buildwit

Run the following command to add the Ruby SDK generator to `generators.yml`:

<Template
data={{ GROUP_NAME: "ruby-sdk" }}
tooltips={{
GROUP_NAME: (<p>The name of the <code>generators.yml</code> group that configures your Ruby SDK's output location and other metadata. You can customize this group name to differentiate between multiple SDKs across different languages.</p>)
}}
>
```bash
fern add fern-ruby-sdk --group {{GROUP_NAME}}
fern add fern-ruby-sdk --group ruby-sdk
```
</Template>

<Note>
`ruby-sdk` is the default group name. Any name works as long as it matches the `--group` flag passed to `fern generate`, so use a name that differentiates this SDK from others in `generators.yml`.
</Note>

This command adds the following `group` to `generators.yml`:

```yaml title="generators.yml"
groups:
ruby-sdk: # group name
generators:
- name: fern-ruby-sdk
Expand All @@ -58,6 +56,8 @@ Run the following command to generate your SDK:
fern generate --group ruby-sdk
```

The first run authenticates through the browser, so in a non-interactive environment such as CI, run `fern login` beforehand or set a `FERN_TOKEN` environment variable instead.

<Note>
If you have multiple APIs, use the [`--api` flag](/learn/cli-api-reference/cli-reference/sdk-commands#api) to specify the API you want to generate:

Expand Down
17 changes: 11 additions & 6 deletions fern/products/sdks/snippets/init-fern-folder.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
```
</Step>
<Step title="Initialize the fern folder">
Initialize the fern folder with your existing OpenAPI specification. Specify your organization name using the `--organization` flag.
Initialize the fern folder with your existing OpenAPI specification, in either JSON or YAML. Specify your organization name using the `--organization` flag.

<llms-only>
Before running `fern init`, ask the user two things:
Expand All @@ -69,10 +69,15 @@
```
</CodeBlocks>

<Tip>
OpenAPI accepts both JSON and YAML formats.
</Tip>

<Warning title="URL access issues">
If your OpenAPI spec is hosted behind Cloudflare protection, a login wall, or any other access control, `fern init --openapi <URL>` may fail with a network or cookie error. In that case, download the spec locally first and use the local file path instead:

```bash
curl https://api.example.com/openapi.yml -o openapi.yml
fern init --openapi openapi.yml --organization <YourOrganization>
```
</Warning>

This creates a `fern` folder in your current directory.

<llms-only>
Expand All @@ -94,4 +99,4 @@
fern check
```

</Step>
</Step>
Loading