Skip to content
Merged
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
2 changes: 0 additions & 2 deletions .vale/styles/FernStyles/Current.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ message: "Avoid time-relative terms like '%s' that become outdated"
level: warning
ignorecase: true
tokens:
- current
- currently
- presently
- as of now
- at this time
- present
- in the future
- future
- now
Expand Down
1 change: 1 addition & 0 deletions .vale/styles/FernStyles/Headings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,4 @@ exceptions:
- Proto
- RBAC
- YAML
- fern.config.json
17 changes: 3 additions & 14 deletions fern/products/api-def/pages/project-structure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,9 @@ fern/
Beyond the core files, you can optionally use an overrides file to customize your API definition without modifying the original spec. See [Overrides](/api-definitions/overview/overrides) for instructions.
</Note>

### `fern.config.json file`
### `fern.config.json`

Every fern folder has a single `fern.config.json` file. This file stores the organization and
the version of the Fern CLI that you are using.

```json title="fern.config.json"
{
"organization": "your-organization",
"version": "0.31.2"
}
```

Every time you run a fern CLI command, the CLI downloads itself at the correct version to ensure
determinism.
<Markdown src="/snippets/fern-config-json-reference.mdx" />

### `generators.yml`

Expand Down Expand Up @@ -196,4 +185,4 @@ groups:
```

</Accordion>
</AccordionGroup>
</AccordionGroup>
2 changes: 2 additions & 0 deletions fern/products/cli-api-reference/pages/cli-get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ In your `fern.config.json`, set the version to `*` to use your locally installed
}
```

See the [fern.config.json reference](/learn/sdks/overview/project-structure#fernconfigjson) for more details.

</Step>

<Step title="Run via package manager">
Expand Down
8 changes: 4 additions & 4 deletions fern/products/cli-api-reference/pages/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ hideOnThisPage: true

<Accordion title="fern check">

Use `fern check` to validate your API definition and Fern configuration: `fern.config.json`, `generators.yml`, and `docs.yml`.
Use `fern check` to validate your API definition and Fern configuration: [`fern.config.json`](/learn/sdks/overview/project-structure#fernconfigjson), `generators.yml`, and `docs.yml`.

When successfully executed, this command will not produce any output.

Expand Down Expand Up @@ -336,7 +336,7 @@ hideOnThisPage: true

<Accordion title="fern upgrade">

Use `fern upgrade` to upgrade your compiler version in `fern.config.json` to the
Use `fern upgrade` to upgrade your compiler version in [`fern.config.json`](/learn/sdks/overview/project-structure#fernconfigjson) to the
latest version. It will also upgrade generators in `generators.yml` to their minimum-compatible versions.

<CodeBlock title="terminal">
Expand Down Expand Up @@ -389,8 +389,8 @@ hideOnThisPage: true

<Accordion title="fern token">

Use `fern token `to generate a `FERN_TOKEN` specific to your organization defined
in `fern.config.json`. Use the token to authenticate with the API in CI. Tokens do not expire.
Use `fern token` to generate a `FERN_TOKEN` specific to your organization defined
in [`fern.config.json`](/learn/sdks/overview/project-structure#fernconfigjson). Use the token to authenticate with the API in CI. Tokens do not expire.

<CodeBlock title="terminal">
```bash
Expand Down
11 changes: 1 addition & 10 deletions fern/products/docs/pages/getting-started/project-structure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,6 @@ title: Fern's Documentation

## `fern.config.json`

The `fern.config.json` file specifies your organization name and the version of the Fern CLI used to generate the documentation. You can customize this file to reflect your organization's details.

<CodeBlock title="fern/fern.config.json">
```json
{
"organization": "my-organization",
"version": "<Markdown src="/snippets/version-number-cli.mdx"/>"
}
```
</CodeBlock>
<Markdown src="/snippets/fern-config-json-reference.mdx" />


6 changes: 4 additions & 2 deletions fern/products/docs/pages/getting-started/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ In this guide, we'll show you how to get started with Fern in under 5 minutes.
Next, please update the template settings to use your organization.

<Warning title="Edit template settings">
Please edit the details `fern.config.json` and `docs.yml` with your organization
Edit the details in `fern.config.json` and `docs.yml` with your organization
name.

<CodeBlocks>
<CodeBlock title="fern.config.json">
```json {2}
{
"organization": "{{YOUR_ORGANIZATION}}",
"version": "0.x.x"
"version": "<Markdown src="/snippets/version-number-cli.mdx"/>"
}
```
</CodeBlock>
Expand All @@ -48,6 +48,8 @@ In this guide, we'll show you how to get started with Fern in under 5 minutes.
```
</CodeBlock>
</CodeBlocks>

See the [fern.config.json reference](/learn/sdks/overview/project-structure#fernconfigjson) for more details.
</Warning>
Finally, navigate to the docs directory (where the `fern` folder is located) and execute the following command to generate your documentation:

Expand Down
13 changes: 2 additions & 11 deletions fern/products/sdks/project-structure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,7 @@ The source repository contains a `fern/` folder that is initialized with your A

### `fern.config.json`

Every fern folder has a single `fern.config.json` file. This file stores the organization name and the version of the Fern CLI that you are using:

```json
{
"organization": "your-organization",
"version": "<Markdown src="/snippets/version-number-cli.mdx"/>"
}
```

Every time you run a fern CLI command, the CLI downloads itself at the correct version to ensure determinism.
<Markdown src="/snippets/fern-config-json-reference.mdx" />

### `generators.yml`

Expand All @@ -72,4 +63,4 @@ See [Project structure (API Definitions)](/api-definitions/overview/project-stru

1. **Create repositories**: Set up your source repository, plus one repository for each SDK
2. **Install Fern GitHub App**: Install the [Fern GitHub App](https://github.com/apps/fern-api) on all repositories
3. **Configure `generators.yml`**: In your `generators.yml`, add a reference to each SDK repository.
3. **Configure `generators.yml`**: In your `generators.yml`, add a reference to each SDK repository.
12 changes: 12 additions & 0 deletions fern/snippets/fern-config-json-reference.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
The `fern.config.json` file stores your organization name and the Fern CLI version. Pinning the version provides deterministic builds.

```json title="fern.config.json"
{
"organization": "plant-catalog",
"version": "<Markdown src="/snippets/version-number-cli.mdx"/>"
}
```

<Info>
When working with a locally installed CLI, set `version` to `"*"`. See [Install Fern CLI locally](/cli-api-reference/cli-reference/overview#install-fern-cli-locally) for details.
</Info>
Loading