CLI

fern check

Use fern check to validate your API definition and Fern configuration. Your Fern configuration includes fern.config.json, generators.yml, and docs.yml.

When successfully executed, this command will not produce any output, indicating it has run without issues.

Usage

$fern check

Usage in a GitHub Action

.github/workflows/fern-check.yml
1name: Fern Validation Check
2
3on:
4pull_request:
5branches: - main
6
7jobs:
8validate-fern-api:
9name: Validate using Fern's linter
10runs-on: ubuntu-latest
11
12 steps:
13 - name: Checkout repository
14 uses: actions/checkout@v4
15
16 - name: Set up Node.js
17 uses: actions/setup-node@v2
18 with:
19 node-version: '14'
20
21 - name: Install Fern
22 run: npm install -g fern-api
23
24 - name: Validate API with Fern
25 run: fern check