Skip to content

Commit 921a7d3

Browse files
devin-ai-integration[bot]chdeskurdevalog
authored
Document HTTP snippets enabled by default with configuration options (#1288)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Catherine Deskur <[email protected]> Co-authored-by: Devin Logan <[email protected]>
1 parent 5c00dca commit 921a7d3

File tree

3 files changed

+50
-10
lines changed

3 files changed

+50
-10
lines changed

fern/products/docs/pages/api-references/http-snippets.mdx

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,24 @@ subtitle: HTTP snippets allow users to see API request examples using common HTT
88
![HTTP code snippet selector](./http-snippets.png)
99
</Frame>
1010

11-
## Setup
11+
## Configuration
1212

13-
1. Ensure you have a paid Fern subscription
14-
2. Contact support to request HTTP snippets activation
15-
3. Once enabled, build your production docs
13+
HTTP snippets are enabled by default for all documentation sites. To disable snippets or enable only for certain languages, use the `settings.http-snippets` configuration in your `docs.yml` file:
1614

17-
<Note>
18-
Currently, HTTP snippets are provided as an all-or-nothing set. You cannot configure which languages are displayed. If you would like this feature, please [open a GitHub issue](https://github.com/fern-api/fern/issues/new?template=docs-feature.yml).
19-
</Note>
15+
<CodeBlock title="docs.yml">
16+
17+
```yaml
18+
# Turn off HTTP snippets for all languages
19+
settings:
20+
http-snippets: false
21+
22+
# Enable only for specific languages (here, only Python and Ruby)
23+
settings:
24+
http-snippets:
25+
- python
26+
- ruby
27+
```
28+
</CodeBlock>
2029
2130
## How It Works
2231

fern/products/docs/pages/changelog/2025-10-17.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
## HTTP Snippets now enabled by default
2+
3+
HTTP snippets are now enabled by default for all documentation sites, making it easier for developers to see cURL, Python, Ruby, and other HTTP client examples directly in your API reference. Previously, this feature required internal configuration to activate.
4+
5+
You can now control HTTP snippets directly in your `docs.yml` file:
6+
7+
```yaml title="docs.yml"
8+
# Turn off HTTP snippets
9+
settings:
10+
http-snippets: false
11+
12+
# Or specify only certain languages
13+
settings:
14+
http-snippets:
15+
- python
16+
- ruby
17+
```
18+
19+
Visit the [HTTP snippets documentation](/docs/api-references/http-snippets) to learn more.
20+
121
## Introducing Runnable Endpoint
222
323
Test API endpoints directly from your documentation with our new interactive component. Runnable Endpoint allows your users to send real HTTP requests to your API without leaving your docs, making it easier for developers to explore and understand your API.

fern/products/docs/pages/customization/what-is-docs-yml.mdx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ settings:
458458
disable-search: false
459459
dark-mode-code: true
460460
default-search-filters: true
461-
http-snippets: true
461+
http-snippets: false
462462
hide-404-page: true
463463
use-javascript-as-typescript: false
464464
```
@@ -481,8 +481,19 @@ settings:
481481
If set to true, search will display results for pages within the current product and version.
482482
</ParamField>
483483

484-
<ParamField path="settings.http-snippets" type="boolean" required={false} default="false" toc={true}>
485-
If set to true, the HTTP snippets will be displayed in the API Reference.
484+
<ParamField path="settings.http-snippets" type="boolean | list of objects" required={false} default="true" toc={true}>
485+
Controls the display of [HTTP snippets in the API Reference](/docs/api-references/http-snippets). HTTP snippets are enabled by default for all languages.
486+
487+
- Set to `false` to disable HTTP snippets completely
488+
- Provide a list of languages to enable snippets for specific languages only
489+
490+
```yaml title="docs.yml"
491+
# Enable only for Python and Ruby
492+
settings:
493+
http-snippets:
494+
- python
495+
- ruby
496+
```
486497
</ParamField>
487498

488499
<ParamField path="settings.hide-404-page" type="boolean" required={false} default="false" toc={true}>

0 commit comments

Comments
 (0)