Skip to content

Commit 5c6a8a6

Browse files
authored
Merge branch 'main' into devin/1762621931-parameterized-snippets
2 parents ccbd47d + cc098ae commit 5c6a8a6

File tree

7 files changed

+116
-48
lines changed

7 files changed

+116
-48
lines changed

.vale/styles/FernStyles/Acronyms.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,4 @@ exceptions:
100100
- FDR
101101
- SSR
102102
- SSG
103+
- REST

fern/apis/fai/openapi.json

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,8 @@
429429
"tags": [
430430
"Code"
431431
],
432-
"summary": "Create Code",
433-
"operationId": "create_code",
432+
"summary": "Create Code Record",
433+
"operationId": "create_code_record",
434434
"parameters": [
435435
{
436436
"name": "domain",
@@ -447,7 +447,7 @@
447447
"content": {
448448
"application/json": {
449449
"schema": {
450-
"$ref": "#/components/schemas/CreateCodeRequest"
450+
"$ref": "#/components/schemas/CreateCodeRecordRequest"
451451
}
452452
}
453453
}
@@ -460,9 +460,9 @@
460460
"schema": {
461461
"type": "array",
462462
"items": {
463-
"$ref": "#/components/schemas/CreateCodeResponse"
463+
"$ref": "#/components/schemas/CreateCodeRecordResponse"
464464
},
465-
"title": "Response Create Code Code Domain Create Post"
465+
"title": "Response Create Code Record Code Domain Create Post"
466466
}
467467
}
468468
}
@@ -493,8 +493,8 @@
493493
"tags": [
494494
"Code"
495495
],
496-
"summary": "Batch Create Code",
497-
"operationId": "batch_create_code",
496+
"summary": "Batch Create Code Records",
497+
"operationId": "batch_create_code_records",
498498
"parameters": [
499499
{
500500
"name": "domain",
@@ -513,7 +513,7 @@
513513
"schema": {
514514
"type": "array",
515515
"items": {
516-
"$ref": "#/components/schemas/CreateCodeRequest"
516+
"$ref": "#/components/schemas/CreateCodeRecordRequest"
517517
},
518518
"title": "Body"
519519
}
@@ -528,9 +528,9 @@
528528
"schema": {
529529
"type": "array",
530530
"items": {
531-
"$ref": "#/components/schemas/CreateCodeResponse"
531+
"$ref": "#/components/schemas/CreateCodeRecordResponse"
532532
},
533-
"title": "Response Batch Create Code Code Domain Batch Create Post"
533+
"title": "Response Batch Create Code Records Code Domain Batch Create Post"
534534
}
535535
}
536536
}
@@ -561,8 +561,8 @@
561561
"tags": [
562562
"Code"
563563
],
564-
"summary": "Get Code By Id",
565-
"operationId": "get_code_by_id",
564+
"summary": "Get Code Record By Id",
565+
"operationId": "get_code_record_by_id",
566566
"parameters": [
567567
{
568568
"name": "domain",
@@ -589,7 +589,7 @@
589589
"content": {
590590
"application/json": {
591591
"schema": {
592-
"$ref": "#/components/schemas/GetCodeResponse"
592+
"$ref": "#/components/schemas/GetCodeRecordResponse"
593593
}
594594
}
595595
}
@@ -620,8 +620,8 @@
620620
"tags": [
621621
"Code"
622622
],
623-
"summary": "Get Code",
624-
"operationId": "get_code",
623+
"summary": "Get Code Records",
624+
"operationId": "get_code_records",
625625
"parameters": [
626626
{
627627
"name": "domain",
@@ -675,7 +675,7 @@
675675
"content": {
676676
"application/json": {
677677
"schema": {
678-
"$ref": "#/components/schemas/GetCodeEntriesResponse"
678+
"$ref": "#/components/schemas/GetCodeRecordsResponse"
679679
}
680680
}
681681
}
@@ -706,8 +706,8 @@
706706
"tags": [
707707
"Code"
708708
],
709-
"summary": "Delete Code By Id",
710-
"operationId": "delete_code_by_id",
709+
"summary": "Delete Code Record By Id",
710+
"operationId": "delete_code_record_by_id",
711711
"parameters": [
712712
{
713713
"name": "domain",
@@ -724,7 +724,7 @@
724724
"content": {
725725
"application/json": {
726726
"schema": {
727-
"$ref": "#/components/schemas/DeleteCodeRequest"
727+
"$ref": "#/components/schemas/DeleteCodeRecordRequest"
728728
}
729729
}
730730
}
@@ -735,7 +735,7 @@
735735
"content": {
736736
"application/json": {
737737
"schema": {
738-
"$ref": "#/components/schemas/DeleteCodeResponse"
738+
"$ref": "#/components/schemas/DeleteCodeRecordResponse"
739739
}
740740
}
741741
}
@@ -766,8 +766,8 @@
766766
"tags": [
767767
"Code"
768768
],
769-
"summary": "Delete All Code",
770-
"operationId": "delete_all_code",
769+
"summary": "Delete All Code Records",
770+
"operationId": "delete_all_code_records",
771771
"parameters": [
772772
{
773773
"name": "domain",
@@ -785,7 +785,7 @@
785785
"content": {
786786
"application/json": {
787787
"schema": {
788-
"$ref": "#/components/schemas/DeleteCodeResponse"
788+
"$ref": "#/components/schemas/DeleteCodeRecordResponse"
789789
}
790790
}
791791
}
@@ -4436,7 +4436,7 @@
44364436
],
44374437
"title": "ConversationTurnFeedback"
44384438
},
4439-
"CreateCodeRequest": {
4439+
"CreateCodeRecordRequest": {
44404440
"properties": {
44414441
"document": {
44424442
"type": "string",
@@ -4535,9 +4535,9 @@
45354535
"required": [
45364536
"document"
45374537
],
4538-
"title": "CreateCodeRequest"
4538+
"title": "CreateCodeRecordRequest"
45394539
},
4540-
"CreateCodeResponse": {
4540+
"CreateCodeRecordResponse": {
45414541
"properties": {
45424542
"code_id": {
45434543
"type": "string",
@@ -4549,7 +4549,7 @@
45494549
"required": [
45504550
"code_id"
45514551
],
4552-
"title": "CreateCodeResponse"
4552+
"title": "CreateCodeRecordResponse"
45534553
},
45544554
"CreateDocumentRequest": {
45554555
"properties": {
@@ -4841,7 +4841,7 @@
48414841
],
48424842
"title": "DeleteAllWebsitesResponse"
48434843
},
4844-
"DeleteCodeRequest": {
4844+
"DeleteCodeRecordRequest": {
48454845
"properties": {
48464846
"code_id": {
48474847
"type": "string",
@@ -4853,9 +4853,9 @@
48534853
"required": [
48544854
"code_id"
48554855
],
4856-
"title": "DeleteCodeRequest"
4856+
"title": "DeleteCodeRecordRequest"
48574857
},
4858-
"DeleteCodeResponse": {
4858+
"DeleteCodeRecordResponse": {
48594859
"properties": {
48604860
"success": {
48614861
"type": "boolean",
@@ -4867,7 +4867,7 @@
48674867
"required": [
48684868
"success"
48694869
],
4870-
"title": "DeleteCodeResponse"
4870+
"title": "DeleteCodeRecordResponse"
48714871
},
48724872
"DeleteDocumentRequest": {
48734873
"properties": {
@@ -5267,7 +5267,20 @@
52675267
],
52685268
"title": "Feedback"
52695269
},
5270-
"GetCodeEntriesResponse": {
5270+
"GetCodeRecordResponse": {
5271+
"properties": {
5272+
"document": {
5273+
"$ref": "#/components/schemas/Code",
5274+
"description": "The requested code"
5275+
}
5276+
},
5277+
"type": "object",
5278+
"required": [
5279+
"document"
5280+
],
5281+
"title": "GetCodeRecordResponse"
5282+
},
5283+
"GetCodeRecordsResponse": {
52715284
"properties": {
52725285
"documents": {
52735286
"items": {
@@ -5287,20 +5300,7 @@
52875300
"documents",
52885301
"pagination"
52895302
],
5290-
"title": "GetCodeEntriesResponse"
5291-
},
5292-
"GetCodeResponse": {
5293-
"properties": {
5294-
"document": {
5295-
"$ref": "#/components/schemas/Code",
5296-
"description": "The requested code"
5297-
}
5298-
},
5299-
"type": "object",
5300-
"required": [
5301-
"document"
5302-
],
5303-
"title": "GetCodeResponse"
5303+
"title": "GetCodeRecordsResponse"
53045304
},
53055305
"GetConversationResolutionResponse": {
53065306
"properties": {

fern/products/docs/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ navigation:
6767
path: ./pages/component-library/default-components/code-blocks.mdx
6868
icon: fa-duotone fa-code
6969
slug: code-blocks
70+
- page: Copy
71+
path: ./pages/component-library/default-components/copy.mdx
72+
icon: fa-duotone fa-copy
7073
- page: Download
7174
path: ./pages/component-library/default-components/download.mdx
7275
icon: fa-duotone fa-download

fern/products/docs/pages/changelog/2025-11-08.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,16 @@ This renders as:
1919
<Markdown src="/snippets/watering-schedule.mdx" plant="peace lily" interval="3" />
2020

2121
Learn more about [reusable Markdown snippets](/learn/docs/writing-content/reusable-snippet).
22+
23+
## New Copy component for inline copyable text
24+
25+
The `<Copy>` component makes text copyable with a single click. Use it inline to allow readers to quickly copy version numbers, commands, API keys, or other text snippets without selecting and copying manually.
26+
27+
You can also customize what gets copied to the clipboard using the `clipboard` prop. This is useful when you want simplify commands, versions, or URLs for readability while copying complete values.
28+
29+
```jsx Markdown
30+
Use the Fern CLI to build and consume REST APIs. The latest version is
31+
<Copy>v2.0</Copy>.
32+
```
33+
34+
Read more in the [Copy component documentation](/learn/docs/writing-content/components/copy).
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: Copy
3+
description: Make text copyable with a click-to-copy button.
4+
---
5+
6+
The `<Copy>` component makes text copyable with a single click. Use it inline to allow readers to copy version numbers, commands, API keys, or other text snippets without selecting and copying manually.
7+
8+
## Usage
9+
10+
<div className="highlight-frame">
11+
<div className="highlight-frame-content">
12+
Use the Fern CLI to build and consume REST APIs. The current version is <Copy>v2.0</Copy>.
13+
</div>
14+
</div>
15+
16+
```jsx Markdown
17+
Use the Fern CLI to build and consume REST APIs. The current version is <Copy>v2.0</Copy>.
18+
```
19+
20+
## Variants
21+
22+
### Custom clipboard content
23+
24+
Use the `clipboard` prop to display one value while copying a different value to the clipboard This is useful when you want simplify commands, versions, or URLs for readability while copying complete values.
25+
26+
<div className="highlight-frame">
27+
<div className="highlight-frame-content">
28+
Install the CLI using <Copy clipboard="npm install -g bamboo-leaf-cli">npm install</Copy>
29+
</div>
30+
</div>
31+
32+
```jsx Markdown
33+
Install the CLI using <Copy clipboard="npm install -g bamboo-leaf-cli">npm install</Copy>
34+
```
35+
36+
## Properties
37+
38+
<ParamField path="children" type="string | ReactNode" required={true}>
39+
The text content to display and make copyable. This is what users see on the page.
40+
</ParamField>
41+
42+
<ParamField path="clipboard" type="string" required={false}>
43+
Custom text to copy to the clipboard. Use this when you want to display one value but copy a different value.
44+
</ParamField>

fern/products/docs/pages/component-library/default-components/overview.mdx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: 'Components overview'
33
description: 'Built-in components for creating interactive documentation'
44
---
55

6-
Fern includes 20 built-in components for creating interactive documentation. Select a component below to view usage examples and configuration options.
6+
Fern includes 21 built-in components for creating interactive documentation. Select a component below to view usage examples and configuration options.
77

88
<CardGroup cols={3}>
99
<Card
@@ -62,6 +62,13 @@ Fern includes 20 built-in components for creating interactive documentation. Sel
6262
>
6363
Code examples with syntax highlighting and interactive features
6464
</Card>
65+
<Card
66+
title="Copy"
67+
icon="fa-duotone fa-clipboard"
68+
href="/docs/writing-content/components/copy"
69+
>
70+
Make text copyable with a click-to-copy button
71+
</Card>
6572
<Card
6673
title="Download"
6774
icon="fa-duotone fa-download"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.111.0
1+
0.112.0

0 commit comments

Comments
 (0)