Sync your OpenAPI Specification
Automatically pull your latest OpenAPI spec from a publicly available URL into your fern folder using the sync-openapi GitHub Action. This keeps your committed spec in sync with your live API without manual updates.
Setup
Configure the origin URL
Add the origin field to your generators.yml to specify where your OpenAPI spec is hosted:
Create a GitHub token
Generate a fine-grained personal access token with Contents and Pull requests read/write permissions for your repository.
This creates daily pull requests with any API spec updates. To change the frequency, modify the cron
schedule (see GitHub’s schedule syntax).
Other use cases
If your OpenAPI spec lives in a different repository (rather than at a public URL), you can sync it to your Fern folder using cross-repository sync. See the sync-openapi GitHub Action README for this and other advanced configurations.