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: 1 addition & 1 deletion fern/products/api-def/openapi/extensions/api-version.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Configure API version schemes and headers using `x-fern-version` ex

You can define your API version scheme, such as a `X-API-Version` header. The supported versions and default value are specified like so:

```yaml title="openapi.yaml"
```yaml title="openapi.yml"
x-fern-version:
header: X-API-Version
default: "2.0.0"
Expand Down
6 changes: 3 additions & 3 deletions fern/products/api-def/openapi/extensions/method-names.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Use the `x-fern-sdk-group-name` and `x-fern-sdk-method-name` extensions to contr
In the example below, Fern will generate a
method called `client.users.create()` for the `POST /users` endpoint.

```yaml title="openapi.yaml" {4-5}
```yaml title="openapi.yml" {4-5}
paths:
/users:
post:
Expand All @@ -28,7 +28,7 @@ If you omit the `x-fern-sdk-group-name` extension, the generated SDK method
will live at the root of the client rather than nested under a resource group.
In the example below, Fern will generate a method called `client.send()`:

```yaml title="openapi.yaml" {4}
```yaml title="openapi.yml" {4}
paths:
/send:
post:
Expand All @@ -46,7 +46,7 @@ The generated SDK method preserves the order of group names.

In the example below, Fern will generate a method called `client.users.notifications.send()`:

```yaml title="openapi.yaml"
```yaml title="openapi.yml"
paths:
/users/notifications:
post:
Expand Down
14 changes: 7 additions & 7 deletions fern/products/cli-generator/openapi-extensions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The CLI generator reads several [Fern OpenAPI extensions](/learn/api-definitions

Determines the subcommand group hierarchy. Each list element becomes a nested subcommand, with names converted from camelCase to kebab-case.

```yaml title="openapi.yaml" {4-6}
```yaml title="openapi.yml" {4-6}
paths:
/scheduled-events/{uuid}/invitees:
get:
Expand All @@ -32,7 +32,7 @@ Produces: `cli scheduled-events invitees list-event-invitees`

Sets the leaf command name (used as-is).

```yaml title="openapi.yaml" {4}
```yaml title="openapi.yml" {4}
paths:
/users/me:
get:
Expand All @@ -53,7 +53,7 @@ See [SDK method names](/learn/api-definitions/openapi/extensions/method-names) f

Excludes operations or parameters from the generated CLI. An ignored operation produces no command; an ignored parameter produces no flag.

```yaml title="openapi.yaml" {4}
```yaml title="openapi.yml" {4}
paths:
/internal/debug:
get:
Expand All @@ -62,7 +62,7 @@ paths:

At the parameter level:

```yaml title="openapi.yaml" {7}
```yaml title="openapi.yml" {7}
paths:
/users:
get:
Expand Down Expand Up @@ -91,7 +91,7 @@ Adds a status badge next to the command in `--help` output.
| `deprecated` | `[Deprecated]` |
| `legacy` | `[Legacy]` |

```yaml title="openapi.yaml" {4}
```yaml title="openapi.yml" {4}
paths:
/v2/reports:
get:
Expand All @@ -108,7 +108,7 @@ See [Availability](/learn/api-definitions/openapi/extensions/availability) for m

Overrides the CLI flag name derived from a parameter. By default, parameter names are converted to kebab-case for use as flags.

```yaml title="openapi.yaml" {9}
```yaml title="openapi.yml" {9}
paths:
/users:
get:
Expand All @@ -130,7 +130,7 @@ See [Customize parameter names](/learn/api-definitions/openapi/extensions/parame

Enables auto-pagination for an endpoint. When present, the CLI recognizes `--page-all`, `--page-limit`, and `--page-delay` flags for that command.

```yaml title="openapi.yaml" {5-8}
```yaml title="openapi.yml" {5-8}
paths:
/plants:
get:
Expand Down
12 changes: 8 additions & 4 deletions fern/products/docs/pages/getting-started/project-structure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The configuration files for your docs live in the `fern` folder:
</Folder>
<Folder name="snippets" comment="Reusable MDX snippets" />
<File name="docs.yml" comment="Defines navigation, theme, and hosting" />
<File name="openapi.yaml" comment="API definition (OpenAPI, AsyncAPI, etc.)" />
<File name="openapi.yml" comment="API definition (OpenAPI, AsyncAPI, etc.)" />
<File name="generators.yml" comment="References specs, configures SDKs" />
<File name="fern.config.json" comment="Organization name and CLI version" />
<File name="styles.css" comment="Custom CSS styles" />
Expand Down Expand Up @@ -61,6 +61,10 @@ The `assets` folder contains any images or videos used in your documentation. Yo

The `docs.yml` file is the heart of your Fern documentation site. This configuration file controls your documentation's navigation structure, visual design, site functionality, and hosting settings. Only files referenced in your `docs.yml` navigation (or discovered via a [`folder` configuration](/learn/docs/configuration/navigation#auto-populate-from-folder)) are included in builds — any unreferenced files are ignored.

<Note>
Fern treats `.yml` and `.yaml` extensions identically. This applies to all YAML files in a Fern project, including `docs.yml`, `generators.yml`, and API specification files.
</Note>

For complete configuration options, see the [`docs.yml` reference](/docs/configuration/site-level-settings).

<CodeBlock title="Example fern/docs.yml">
Expand Down Expand Up @@ -132,7 +136,7 @@ To generate [API Reference](/docs/api-references/generate-api-ref) documentation
```yaml title="generators.yml"
api:
specs:
- openapi: openapi.yaml
- openapi: openapi.yml
```

You can optionally [add an overlays file](/learn/api-definitions/openapi/overlays) for additional customizations. To see this in practice, check out [Fluidstack's Fern configuration](https://github.com/fluidstackio/fern-config/tree/main/fern/openapi).
Expand All @@ -144,7 +148,7 @@ To generate [API Reference](/docs/api-references/generate-api-ref) documentation
```yaml title="generators.yml"
api:
specs:
- openapi: openapi.yaml
- openapi: openapi.yml
- asyncapi: asyncapi.yaml
```

Expand All @@ -162,7 +166,7 @@ To generate [API Reference](/docs/api-references/generate-api-ref) documentation
<File name="overrides.yaml" comment="Optional" />
</Folder>
<Folder name="user-api" defaultOpen>
<File name="openapi.yaml" highlighted />
<File name="openapi.yml" highlighted />
<File name="generators.yml" />
<File name="overrides.yaml" comment="Optional" />
</Folder>
Expand Down
4 changes: 2 additions & 2 deletions fern/products/docs/pages/getting-started/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ This guide covers the CLI path. A browser-based guided setup also exists at http
<File name="docs.yml" comment="Defines navigation, theme, and hosting details"/>
<File name="fern.config.json" comment="Specifies org name and CLI version"/>
<File name="generators.yml" comment="Configures SDK generation"/>
<File name="openapi.yaml" comment="API definition"/>
<File name="openapi.yml" comment="API definition"/>
</Folder>
<File name="README.md" />
</Files>
Expand Down Expand Up @@ -182,7 +182,7 @@ This guide covers the CLI path. A browser-based guided setup also exists at http
</Accordion>
<Accordion title='Add an API Reference' >

If you cloned the starter template, you already have an `openapi.yaml` file with sample API definitions. If you started from scratch, add your OpenAPI spec:
If you cloned the starter template, you already have an `openapi.yml` file with sample API definitions (both `.yml` and `.yaml` work interchangeably). If you started from scratch, add your OpenAPI spec:

```bash
fern init --openapi /path/to/openapi.yml
Expand Down
2 changes: 1 addition & 1 deletion fern/products/sdks/deep-dives/customize-method-names.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Fern generates SDK methods using your configured group and method names. Casing

Configure how endpoints map to SDK method and group names in your API definition:

```yaml title="openapi.yaml" {4-5}
```yaml title="openapi.yml" {4-5}
paths:
/users:
post:
Expand Down
6 changes: 3 additions & 3 deletions fern/snippets/open-api-method-names.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Use the `x-fern-sdk-group-name` and `x-fern-sdk-method-name` extensions to contr
In the example below, Fern will generate a
method called `client.users.create()` for the `POST /users` endpoint.

```yaml title="openapi.yaml" {4-5}
```yaml title="openapi.yml" {4-5}
paths:
/users:
post:
Expand All @@ -21,7 +21,7 @@ If you omit the `x-fern-sdk-group-name` extension, the generated SDK method
will live at the root of the client rather than nested under a resource group.
In the example below, Fern will generate a method called `client.send()`:

```yaml title="openapi.yaml" {4}
```yaml title="openapi.yml" {4}
paths:
/send:
post:
Expand All @@ -39,7 +39,7 @@ The generated SDK method preserves the order of group names.

In the example below, Fern will generate a method called `client.users.notifications.send()`:

```yaml title="openapi.yaml"
```yaml title="openapi.yml"
paths:
/users/notifications:
post:
Expand Down
Loading