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/cli-api-reference/pages/commands.mdx
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -328,6 +328,20 @@ hideOnThisPage: true
328
328
fern check --warnings
329
329
```
330
330
331
+
### Validation rules
332
+
333
+
`fern check`runs the following validation rules. Each rule can be set to `"warn"` or `"error"` via [`check.rules`](/learn/docs/configuration/site-level-settings#check-configuration) in `docs.yml`.
| `example-validation` | `warn` | Validates OpenAPI examples against their schemas. |
339
+
| `no-non-component-refs` | `error` | Flags `$ref` values pointing outside `#/components` in an OpenAPI spec. |
340
+
| `valid-local-references` | `warn` | Checks that local `$ref` values resolve to existing definitions. |
341
+
| `no-circular-redirects` | `error` | Detects redirect chains that loop back to a previously visited path. |
342
+
| `valid-docs-endpoints` | `warn` | Checks that endpoint URLs in `docs.yml` are well-formed. |
343
+
| `missing-redirects` | `warn` | Flags pages removed or moved without a [redirect](/learn/docs/seo/redirects). Compares against the previously published state. Requires authentication; skipped on first publish. |
344
+
331
345
## Usage in a GitHub Action
332
346
333
347
<CodeBlock title = ".github/workflows/fern-check.yml" >
Copy file name to clipboardExpand all lines: fern/products/docs/pages/seo/redirects.mdx
+1-13Lines changed: 1 addition & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,19 +14,7 @@ subtitle: Learn how to configure redirects in Fern Docs. Set up exact path redir
14
14
15
15
## Catching missing redirects
16
16
17
-
The `missing-redirects` rule for [`fern check`](/learn/cli-api-reference/commands#check) automatically detects pages that were removed or moved without a redirect. It compares your current docs navigation against the previously published state and warns when a previously published URL would return a 404.
18
-
19
-
The rule defaults to `warn` severity. To treat missing redirects as errors, configure the rule in `docs.yml`:
20
-
21
-
```yaml docs.yml
22
-
check:
23
-
rules:
24
-
missing-redirects: error
25
-
```
26
-
27
-
The check requires authentication via `fern login` or the `FERN_TOKEN` environment variable. It is skipped on first publish, when unauthenticated, or when the network is unavailable.
28
-
29
-
For the full list of `fern check` validation rules, see [Check configuration](/learn/docs/configuration/site-level-settings#check-configuration).
17
+
You can use [`fern check`](/learn/cli-api-reference/commands#check) to automatically detect pages that were removed or moved without a redirect. Configure the [`missing-redirects` rule](/learn/docs/configuration/site-level-settings#check-configuration) in `docs.yml` to control its severity.
0 commit comments