Skip to content

Commit 4cec1ba

Browse files
louis-preclaude
andcommitted
fix: Include api-reference source files in tab formatter scope
Adds codegen/source/docs/api-reference/ to the format-code-sample-tabs scan paths so hand-written api-reference pages (authentication.md, pagination.md) also get their tabs normalized. Fixes 6 remaining "cURL (bash)" → "cURL" instances. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 778f132 commit 4cec1ba

3 files changed

Lines changed: 218 additions & 181 deletions

File tree

codegen/format-code-sample-tabs.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ function formatTabsBlock(block: string): { result: string; changed: boolean } {
4747
return { result: lines.join('\n'), changed: true }
4848
}
4949

50-
const dirs = ['docs/guides', 'docs/brand-guides']
50+
const dirs = [
51+
'docs/guides',
52+
'docs/brand-guides',
53+
'codegen/source/docs/api-reference',
54+
]
5155
const files = dirs.flatMap((dir) => globSync(join(dir, '**/*.md')))
5256

5357
let totalChanged = 0

codegen/source/docs/api-reference/authentication.md

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,38 @@ $ export SEAM_API_KEY=seam_test2bMS_94SrGUXuNR2JmJkjtvBQDg5c
1313
Next, run the following code to confirm that you are correctly authenticated:
1414

1515
{% tabs %}
16-
{% tab title="Python" %}
16+
{% tab title="JavaScript" %}
17+
1718
**Code:**
1819

19-
```python
20-
from seam import Seam
20+
```javascript
21+
import { Seam } from "seam";
2122

22-
seam = Seam() # Seam automatically uses your exported SEAM_API_KEY.
23+
const seam = new Seam(); // Seam automatically uses your exported SEAM_API_KEY.
2324

24-
workspace = seam.workspaces.get()
25-
pprint(workspace)
25+
const checkAuth = async () => {
26+
const workspace = await seam.workspaces.get();
27+
console.log(workspace);
28+
}
29+
30+
checkAuth();
2631
```
2732

2833
**Output:**
2934

30-
```
31-
Workspace(
32-
workspace_id='00000000-0000-0000-0000-000000000000',
33-
name='Sandbox',
34-
company_name='Acme',
35-
connect_partner_name='Acme',
36-
is_sandbox=True
37-
)
35+
```json
36+
{
37+
workspace_id: '00000000-0000-0000-0000-000000000000',
38+
name: 'Sandbox',
39+
company_name: 'Acme',
40+
connect_partner_name: 'Acme',
41+
is_sandbox": true
42+
}
3843
```
3944
{% endtab %}
4045

41-
{% tab title="cURL (bash)" %}
46+
{% tab title="cURL" %}
47+
4248
**Code:**
4349

4450
```bash
@@ -66,36 +72,34 @@ curl -X 'POST' \
6672
```
6773
{% endtab %}
6874

69-
{% tab title="JavaScript" %}
70-
**Code:**
75+
{% tab title="Python" %}
7176

72-
```javascript
73-
import { Seam } from "seam";
77+
**Code:**
7478

75-
const seam = new Seam(); // Seam automatically uses your exported SEAM_API_KEY.
79+
```python
80+
from seam import Seam
7681

77-
const checkAuth = async () => {
78-
const workspace = await seam.workspaces.get();
79-
console.log(workspace);
80-
}
82+
seam = Seam() # Seam automatically uses your exported SEAM_API_KEY.
8183

82-
checkAuth();
84+
workspace = seam.workspaces.get()
85+
pprint(workspace)
8386
```
8487

8588
**Output:**
8689

87-
```json
88-
{
89-
workspace_id: '00000000-0000-0000-0000-000000000000',
90-
name: 'Sandbox',
91-
company_name: 'Acme',
92-
connect_partner_name: 'Acme',
93-
is_sandbox": true
94-
}
90+
```
91+
Workspace(
92+
workspace_id='00000000-0000-0000-0000-000000000000',
93+
name='Sandbox',
94+
company_name='Acme',
95+
connect_partner_name='Acme',
96+
is_sandbox=True
97+
)
9598
```
9699
{% endtab %}
97100

98101
{% tab title="Ruby" %}
102+
99103
**Code:**
100104

101105
```ruby
@@ -123,6 +127,7 @@ puts workspace.inspect
123127
{% endtab %}
124128

125129
{% tab title="PHP" %}
130+
126131
**Code:**
127132

128133
```php
@@ -150,6 +155,7 @@ echo json_encode($workspace, JSON_PRETTY_PRINT);
150155
{% endtab %}
151156

152157
{% tab title="C#" %}
158+
153159
**Code:**
154160

155161
```csharp
@@ -174,7 +180,4 @@ Console.WriteLine(workspace);
174180
}
175181
```
176182
{% endtab %}
177-
178-
179-
180183
{% endtabs %}

0 commit comments

Comments
 (0)