Skip to content

Commit 134b2e1

Browse files
Standardize OpenAPI spec references to .yaml across docs
(#5586) Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 08edbf3 commit 134b2e1

7 files changed

Lines changed: 25 additions & 21 deletions

File tree

fern/products/api-def/openapi/extensions/api-version.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: Configure API version schemes and headers using `x-fern-version` ex
77

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

10-
```yaml title="openapi.yaml"
10+
```yaml title="openapi.yml"
1111
x-fern-version:
1212
header: X-API-Version
1313
default: "2.0.0"

fern/products/api-def/openapi/extensions/method-names.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Use the `x-fern-sdk-group-name` and `x-fern-sdk-method-name` extensions to contr
1414
In the example below, Fern will generate a
1515
method called `client.users.create()` for the `POST /users` endpoint.
1616

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

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

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

49-
```yaml title="openapi.yaml"
49+
```yaml title="openapi.yml"
5050
paths:
5151
/users/notifications:
5252
post:

fern/products/cli-generator/openapi-extensions.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The CLI generator reads several [Fern OpenAPI extensions](/learn/api-definitions
1616

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

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

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

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

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

56-
```yaml title="openapi.yaml" {4}
56+
```yaml title="openapi.yml" {4}
5757
paths:
5858
/internal/debug:
5959
get:
@@ -62,7 +62,7 @@ paths:
6262

6363
At the parameter level:
6464

65-
```yaml title="openapi.yaml" {7}
65+
```yaml title="openapi.yml" {7}
6666
paths:
6767
/users:
6868
get:
@@ -91,7 +91,7 @@ Adds a status badge next to the command in `--help` output.
9191
| `deprecated` | `[Deprecated]` |
9292
| `legacy` | `[Legacy]` |
9393

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

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

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

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

133-
```yaml title="openapi.yaml" {5-8}
133+
```yaml title="openapi.yml" {5-8}
134134
paths:
135135
/plants:
136136
get:

fern/products/docs/pages/getting-started/project-structure.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The configuration files for your docs live in the `fern` folder:
1919
</Folder>
2020
<Folder name="snippets" comment="Reusable MDX snippets" />
2121
<File name="docs.yml" comment="Defines navigation, theme, and hosting" />
22-
<File name="openapi.yaml" comment="API definition (OpenAPI, AsyncAPI, etc.)" />
22+
<File name="openapi.yml" comment="API definition (OpenAPI, AsyncAPI, etc.)" />
2323
<File name="generators.yml" comment="References specs, configures SDKs" />
2424
<File name="fern.config.json" comment="Organization name and CLI version" />
2525
<File name="styles.css" comment="Custom CSS styles" />
@@ -61,6 +61,10 @@ The `assets` folder contains any images or videos used in your documentation. Yo
6161

6262
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.
6363

64+
<Note>
65+
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.
66+
</Note>
67+
6468
For complete configuration options, see the [`docs.yml` reference](/docs/configuration/site-level-settings).
6569

6670
<CodeBlock title="Example fern/docs.yml">
@@ -132,7 +136,7 @@ To generate [API Reference](/docs/api-references/generate-api-ref) documentation
132136
```yaml title="generators.yml"
133137
api:
134138
specs:
135-
- openapi: openapi.yaml
139+
- openapi: openapi.yml
136140
```
137141

138142
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).
@@ -144,7 +148,7 @@ To generate [API Reference](/docs/api-references/generate-api-ref) documentation
144148
```yaml title="generators.yml"
145149
api:
146150
specs:
147-
- openapi: openapi.yaml
151+
- openapi: openapi.yml
148152
- asyncapi: asyncapi.yaml
149153
```
150154

@@ -162,7 +166,7 @@ To generate [API Reference](/docs/api-references/generate-api-ref) documentation
162166
<File name="overrides.yaml" comment="Optional" />
163167
</Folder>
164168
<Folder name="user-api" defaultOpen>
165-
<File name="openapi.yaml" highlighted />
169+
<File name="openapi.yml" highlighted />
166170
<File name="generators.yml" />
167171
<File name="overrides.yaml" comment="Optional" />
168172
</Folder>

fern/products/docs/pages/getting-started/quickstart.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ This guide covers the CLI path. A browser-based guided setup also exists at http
8888
<File name="docs.yml" comment="Defines navigation, theme, and hosting details"/>
8989
<File name="fern.config.json" comment="Specifies org name and CLI version"/>
9090
<File name="generators.yml" comment="Configures SDK generation"/>
91-
<File name="openapi.yaml" comment="API definition"/>
91+
<File name="openapi.yml" comment="API definition"/>
9292
</Folder>
9393
<File name="README.md" />
9494
</Files>
@@ -182,7 +182,7 @@ This guide covers the CLI path. A browser-based guided setup also exists at http
182182
</Accordion>
183183
<Accordion title='Add an API Reference' >
184184

185-
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:
185+
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:
186186

187187
```bash
188188
fern init --openapi /path/to/openapi.yml

fern/products/sdks/deep-dives/customize-method-names.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Fern generates SDK methods using your configured group and method names. Casing
4141

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

44-
```yaml title="openapi.yaml" {4-5}
44+
```yaml title="openapi.yml" {4-5}
4545
paths:
4646
/users:
4747
post:

fern/snippets/open-api-method-names.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Use the `x-fern-sdk-group-name` and `x-fern-sdk-method-name` extensions to contr
77
In the example below, Fern will generate a
88
method called `client.users.create()` for the `POST /users` endpoint.
99

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

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

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

42-
```yaml title="openapi.yaml"
42+
```yaml title="openapi.yml"
4343
paths:
4444
/users/notifications:
4545
post:

0 commit comments

Comments
 (0)