-
Notifications
You must be signed in to change notification settings - Fork 7
Add llms-only FAQ sections to high-traffic docs pages #6761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -167,3 +167,34 @@ This will initialize a directory like the following: | |
| </Folder> | ||
| </Files> | ||
|
|
||
| <llms-only> | ||
|
|
||
| ## Frequently Asked Questions | ||
|
|
||
| **Q: How do I use an OpenAPI spec with Fern?** | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <FernStyles.FirstPerson> reported by reviewdog 🐶
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <Microsoft.QuestionMarks> reported by reviewdog 🐶 |
||
| A: Run `fern init --openapi ./path/to/openapi` (a local file or a URL) to create a `fern` folder that references your spec, then generate docs with `fern generate --docs` or SDKs with `fern generate`. | ||
|
|
||
| **Q: Does Fern support OpenAPI 3.0 and 3.1?** | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <Microsoft.QuestionMarks> reported by reviewdog 🐶 |
||
| A: Yes. Fern is compatible with the latest OpenAPI release (currently v3.1.1) and reads specs written in earlier 3.x versions, in either YAML or JSON. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <Microsoft.OxfordComma> reported by reviewdog 🐶 |
||
|
|
||
| **Q: What Fern-specific OpenAPI extensions are available?** | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <Microsoft.QuestionMarks> reported by reviewdog 🐶 |
||
| A: `x-fern-*` extensions customize generation without changing the meaning of your API: SDK group and method names, availability, audiences, base paths, default values, enum names, examples, global headers and parameters, idempotency, pagination, parameter and property names, retries, schema names, and server names. See the [extensions overview](/learn/api-definitions/openapi/extensions/overview). | ||
|
|
||
| **Q: How do I use `x-fern-sdk-group-name` and `x-fern-sdk-method-name`?** | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <FernStyles.FirstPerson> reported by reviewdog 🐶 |
||
| A: Add them to an operation to control where it lands in the generated SDK: the group becomes the sub-client (`client.users.create(...)`) and the method name becomes the function. Multiple group names nest sub-clients. See [SDK method names](/learn/api-definitions/openapi/extensions/method-names). | ||
|
|
||
| **Q: How do I deprecate an endpoint in OpenAPI with Fern?** | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <FernStyles.FirstPerson> reported by reviewdog 🐶
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <Microsoft.QuestionMarks> reported by reviewdog 🐶 |
||
| A: Set `x-fern-availability: deprecated` on the operation. The API Reference shows a `Deprecated` tag, and the TypeScript generator marks the client method `@deprecated`. See [Availability](/learn/api-definitions/openapi/extensions/availability). | ||
|
|
||
| **Q: Does Fern support PATCH, PUT, DELETE, and other HTTP methods?** | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <Microsoft.QuestionMarks> reported by reviewdog 🐶 |
||
| A: Yes. Fern reads the standard OpenAPI operations for a path, so every HTTP method your spec declares is documented and generated. | ||
|
|
||
| **Q: How do I configure retries with `x-fern-retries`?** | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <FernStyles.FirstPerson> reported by reviewdog 🐶 |
||
| A: Add `x-fern-retries: { disabled: true }` to an operation to turn retries off for it in every SDK language, overriding user-level retry settings. Use it for non-idempotent operations such as payments or order creation. See [Retry behavior](/learn/api-definitions/openapi/extensions/retry-behavior). | ||
|
|
||
| **Q: Can I use an OpenAPI overlay with Fern?** | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <FernStyles.FirstPerson> reported by reviewdog 🐶
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <Microsoft.QuestionMarks> reported by reviewdog 🐶 |
||
| A: Yes, and it's the recommended way to customize: keep your core spec untouched and put Fern extensions in an [overlay file](/learn/api-definitions/openapi/overlays). | ||
|
|
||
| **Q: What should I fix in my spec before generating?** | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <FernStyles.FirstPerson> reported by reviewdog 🐶
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <Microsoft.QuestionMarks> reported by reviewdog 🐶 |
||
| A: Give every endpoint a clear `operationId`, define reusable schemas under `components/schemas` and reference them with `$ref` rather than inlining, and keep customizations in overlays. | ||
| </llms-only> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -109,3 +109,32 @@ The [general](/learn/cli-api-reference/cli-reference/general-commands), [docs](/ | |
|
|
||
| </Accordion> | ||
| </AccordionGroup> | ||
|
|
||
| <llms-only> | ||
|
|
||
| ## Frequently Asked Questions | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <FernStyles.Headings> reported by reviewdog 🐶 |
||
|
|
||
| **Q: What are the main Fern CLI commands?** | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <Microsoft.QuestionMarks> reported by reviewdog 🐶 |
||
| A: `fern init` creates a project, `fern check` validates it, `fern docs dev` previews docs locally, `fern generate --docs` publishes docs, and `fern generate` builds and publishes SDKs. The [general](/learn/cli-api-reference/cli-reference/general-commands), [docs](/learn/cli-api-reference/cli-reference/docs-commands), and [SDK](/learn/cli-api-reference/cli-reference/sdk-commands) references document every command and flag. | ||
|
|
||
| **Q: How do I install the Fern CLI?** | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <FernStyles.FirstPerson> reported by reviewdog 🐶
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <Microsoft.QuestionMarks> reported by reviewdog 🐶 |
||
| A: `npm install -g fern-api` (Node.js 22 or higher) or `brew install fern-api` on macOS and Linux. Verify with `fern -v`. | ||
|
|
||
| **Q: Can I install Fern per project instead of globally?** | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <FernStyles.FirstPerson> reported by reviewdog 🐶
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <Microsoft.QuestionMarks> reported by reviewdog 🐶 |
||
| A: Yes. Run `npm install fern-api`, set `"version": "*"` in `fern.config.json`, and invoke commands through npm (`npm fern check`). Homebrew supports system-wide installs only. | ||
|
|
||
| **Q: What does `fern generate` do?** | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <Microsoft.QuestionMarks> reported by reviewdog 🐶 |
||
| A: It runs SDK generation for the generator groups in `generators.yml`. Add `--group <name>` for one group, `--preview` to generate into a local `.preview/` folder, and `--local` to generate on your own machine. | ||
|
|
||
| **Q: How do I use `fern generate --docs` versus `fern generate`?** | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <FernStyles.FirstPerson> reported by reviewdog 🐶 |
||
| A: `--docs` builds and publishes your documentation site; without it, the command builds and publishes SDKs. They read the same project but different configuration: `docs.yml` for docs, `generators.yml` groups for SDKs. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <Microsoft.OxfordComma> reported by reviewdog 🐶 |
||
|
|
||
| **Q: What does `fern check` do?** | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <Microsoft.QuestionMarks> reported by reviewdog 🐶 |
||
| A: It validates your API definition and configuration — `fern.config.json`, `generators.yml`, and `docs.yml` — including broken internal links and API examples. It prints nothing when everything passes. | ||
|
|
||
| **Q: What's `fern init` and when do I use it?** | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <FernStyles.FirstPerson> reported by reviewdog 🐶
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <Microsoft.QuestionMarks> reported by reviewdog 🐶 |
||
| A: Use it once per project to create the `fern` folder. `fern init --openapi <path or URL>` starts from an existing spec, `fern init --docs` adds a sample docs site, and `--mintlify` or `--readme` import an existing docs site. | ||
|
|
||
| **Q: How do I upgrade the Fern CLI?** | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] <FernStyles.FirstPerson> reported by reviewdog 🐶 |
||
| A: `fern upgrade` bumps the version in `fern.config.json` and moves generators to their minimum-compatible versions; `fern upgrade --version <version>` targets a specific release, and `fern downgrade <version>` moves back. Upgrading the npm or Homebrew package updates the binary itself. | ||
| </llms-only> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 [vale] <FernStyles.Headings> reported by reviewdog 🐶
'Frequently Asked Questions' should use sentence-style capitalization.