You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/products/api-def/ferndef-pages/availability.mdx
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,15 +3,17 @@ title: Availability in Fern Definition
3
3
description: Add availability to Fern Definition API services, endpoints, types, or properties to indicate their release status.
4
4
---
5
5
6
-
You can add `availability` to an endpoint, type, or property within your Fern Definition.
6
+
You can add `availability` to an endpoint, type, or property within your Fern Definition. You can configure the `availability` of sections in your API reference documentation in your [`docs.yml` file](/learn/docs/configuration/what-is-docs-yml).
7
+
8
+
## Endpoints, types, and properties
7
9
8
10
Availability can be:
9
11
-`in-development` which means it is being worked on; will show a `Beta` tag
10
12
-`pre-release` which means it is available; will show a `Beta` tag
11
13
-`deprecated` which means it will be removed in the future; will show a `Deprecated` tag
12
14
-`generally-available` which means it is stable and available for use; will show a `GA` tag
13
15
14
-
## Endpoint
16
+
###Endpoint
15
17
16
18
<CodeBlocktitle="pet.yml">
17
19
```yaml {6}
@@ -36,7 +38,7 @@ In Fern Docs, this will look like:
36
38

37
39
</Frame>
38
40
39
-
## Type
41
+
### Type
40
42
41
43
<CodeBlock title="pet.yml">
42
44
```yaml {15}
@@ -69,7 +71,7 @@ In Fern Docs, this will look like:
69
71

70
72
</Frame>
71
73
72
-
## Property
74
+
### Property
73
75
74
76
<CodeBlock title="pet.yml">
75
77
```yaml {12}
@@ -94,3 +96,7 @@ In Fern Docs, this will look like:
94
96
<Frame>
95
97

Copy file name to clipboardExpand all lines: fern/products/api-def/openapi-pages/extensions/availability.mdx
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,11 @@ title: Availability
3
3
description: Mark endpoint availability status using `x-fern-availability` extension
4
4
---
5
5
6
-
The `x-fern-availability` extension is used to mark the availability of an endpoint. The availability information propagates into the generated Fern Docs website as visual tags.
6
+
The `x-fern-availability` extension is used to mark the availability of an endpoint within your OpenAPI definition. The availability information propagates into the generated Fern Docs website as visual tags.
7
+
8
+
You can configure the `availability` of sections in your API reference documentation in your [`docs.yml` file](/learn/docs/configuration/what-is-docs-yml).
9
+
10
+
## Endpoint
7
11
8
12
The options are:
9
13
@@ -24,4 +28,8 @@ This renders as:
24
28
25
29
<Frame caption="A deprecated endpoint">
26
30

Copy file name to clipboardExpand all lines: fern/products/docs/pages/api-references/customize-api-ref.mdx
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -176,7 +176,7 @@ You can hide an endpoint from the API reference by setting `hidden` to `true`. T
176
176
</Tabs>
177
177
178
178
### Adding custom sections
179
-
You can add arbitrary folders in the sidebar by adding a `section` to your API Reference layout. A section can comprise entire groups of endpoints, individual endpoints, or even just Markdown pages. Sections can be customized by adding properties like a `icon`, `summary`, `slug` (or `skip-slug`), and `contents`.
179
+
You can add arbitrary folders in the sidebar by adding a `section` to your API Reference layout. A section can comprise entire groups of endpoints, individual endpoints, or even just Markdown pages. Sections can be customized by adding properties like a `icon`, `summary`, `slug` (or `skip-slug`), `availability`, and `contents`.
180
180
181
181
<Tabs>
182
182
<Tab title="OpenAPI Specification">
@@ -240,3 +240,23 @@ navigation:
240
240
- link: Link Title
241
241
href: http://google.com
242
242
```
243
+
244
+
### Adding availability
245
+
246
+
You can set the availability for the entire API reference or for specific sections. Options are: `stable`, `generally-available`, `in-development`, `pre-release`, `deprecated`, or `beta`.
247
+
248
+
```yaml title="docs.yml" {3, 6}
249
+
navigation:
250
+
- api: API Reference
251
+
availability: generally-available
252
+
layout:
253
+
- section: My Section
254
+
availability: beta
255
+
icon: flower
256
+
contents:
257
+
# endpoints here
258
+
```
259
+
260
+
When you set availability for a section, all endpoints in that section will inherit the section-level availability unless explicitly overridden in your API definition.
261
+
262
+
<Warning>You can't set availability for individual endpoints in `docs.yml`. Endpoint availability must be configured directly in your API definition. Learn more about availability for [OpenAPI](/learn/api-definitions/openapi/extensions/availability) or [Fern Definition](/learn/api-definitions/ferndef/availability).</Warning>
Copy file name to clipboardExpand all lines: fern/products/docs/pages/api-references/generate-api-ref.mdx
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ navigation:
21
21
| `api` (required) | Title of the API Reference Section |
22
22
| `api-name` | Name of the API we are referencing, if there are [multiple APIs](#include-more-than-one-api-reference) |
23
23
| `audiences` | List of [audiences](/docs/api-references/audiences) that determines which endpoints, schemas, and properties are displayed in your API Reference |
24
+
| `availability` | Set the [availability status](/learn/docs/api-references/customize-api-reference-layout#adding-availability) for the entire API Reference or specific sections |
24
25
| `display-errors` | Displays error schemas in the API References |
25
26
| `snippets` | Enable [generated SDK code snippets](/learn/api-reference/snippets/get) in your API Reference |
26
27
| `summary` | Relative path to the Markdown file; the summary is displayed at the top of the API section |
Copy file name to clipboardExpand all lines: fern/products/docs/pages/navigation/overview.mdx
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,6 +97,32 @@ navigation:
97
97
path: ./pages/also-hidden.mdx
98
98
```
99
99
100
+
### Section and page availability
101
+
102
+
You can set availability for individual pages or entire sections. When you set availability for a section, all pages within that section inherit the same availability unless explicitly overridden at the page level.
103
+
104
+
Options are: `stable`, `generally-available`, `in-development`, `pre-release`, `deprecated`, or `beta`.
If you have different versions of your docs, section and page availability should be set in [the `.yml` files that define the navigational structure for each version](/learn/docs/configuration/versions#define-your-versions).
124
+
</Note>
125
+
100
126
## Section overviews
101
127
102
128
To add an overview page to a section, add a `path` property to the section.
Copy file name to clipboardExpand all lines: fern/products/docs/pages/navigation/products.mdx
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -143,7 +143,7 @@ In the below example, Product A is **unversioned** and Product B is **versioned*
143
143
The top-level `doc.yml` configuration for a Fern Docs website containing two products, one unversioned and one versioned, might look something like this:
Copy file name to clipboardExpand all lines: fern/products/docs/pages/navigation/versions.mdx
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,6 +104,25 @@ versions:
104
104
path: ./versions/v2-1.yml
105
105
```
106
106
</CodeBlock>
107
+
</Step>
108
+
<Step title="Indicate availability">
109
+
110
+
You can optionally set the availability status for each version. Options are `deprecated`, `ga`, `stable`, and `beta`.
111
+
112
+
<CodeBlock title="docs.yml">
113
+
```yaml {4}
114
+
versions:
115
+
- display-name: v2.2
116
+
path: ./versions/v2-2.yml
117
+
availability: beta
118
+
- display-name: v2.1
119
+
path: ./versions/v2-1.yml
120
+
availability: stable
121
+
```
122
+
</CodeBlock>
123
+
124
+
Version availability is distinct from [section and page availability](/learn/docs/configuration/navigation#section-and-page-availability), with different options. If you want to set section and page availability, do so in your version-specific `yml` files.
125
+
107
126
</Step>
108
127
<Step title="Remove extra navigation from docs.yml">
You can set the availability for the entire API reference or for specific sections in your `docs.yml` configuration. Options are: `stable`, `generally-available`, `in-development`, `pre-release`, `deprecated`, or `beta`.
2
+
3
+
When you set the availability of a section, all of the endpoints in that section are automatically marked with that availability unless explicitly set otherwise.
0 commit comments