diff --git a/fern/products/sdks/generators/ruby/quickstart.mdx b/fern/products/sdks/generators/ruby/quickstart.mdx index e4cdf781d..7f3d4a162 100644 --- a/fern/products/sdks/generators/ruby/quickstart.mdx +++ b/fern/products/sdks/generators/ruby/quickstart.mdx @@ -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`: - + + + `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`. + This command adds the following `group` to `generators.yml`: ```yaml title="generators.yml" +groups: ruby-sdk: # group name generators: - name: fern-ruby-sdk @@ -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. + 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: diff --git a/fern/products/sdks/snippets/init-fern-folder.mdx b/fern/products/sdks/snippets/init-fern-folder.mdx index 1a3799465..7d128ce1f 100644 --- a/fern/products/sdks/snippets/init-fern-folder.mdx +++ b/fern/products/sdks/snippets/init-fern-folder.mdx @@ -45,7 +45,7 @@ ``` - 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. Before running `fern init`, ask the user two things: @@ -69,10 +69,15 @@ ``` - - OpenAPI accepts both JSON and YAML formats. - - + + If your OpenAPI spec is hosted behind Cloudflare protection, a login wall, or any other access control, `fern init --openapi ` 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 + ``` + + This creates a `fern` folder in your current directory. @@ -94,4 +99,4 @@ fern check ``` - + \ No newline at end of file