Skip to content

Commit a78986e

Browse files
committed
change tabs to accordions and make some other minor changes
1 parent fb3c18e commit a78986e

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

fern/products/sdks/guides/configure-global-headers.mdx

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ description: Guide to configuring global headers in your SDKs.
66
Your API may leverage certain headers for every endpoint or most endpoints.
77
These are called **global headers**.
88

9-
Fern automatically identifies headers that are used in every request, or the
10-
majority of requests, and marks them as global. You can manually configure additional
11-
global headers in either `api.yml` (Fern Definition) or `openapi.yml`.
9+
## How it works for SDK users
1210

1311
Once you configure a global header (either automatically detected or manually
1412
specified), Fern generates an SDK that accepts this as a constructor parameter.
@@ -23,11 +21,14 @@ class Client:
2321
def __init__(self, *, apiKey: str):
2422
```
2523

26-
## Specifying Global Headers in a Fern Definition or OpenAPI spec
27-
<Tabs>
28-
<Tab title="Fern Definition">
24+
## Specifying global headers
25+
26+
Fern automatically identifies headers that are used in every request, or the
27+
majority of requests, and marks them as global. You can manually configure additional
28+
global headers in either `api.yml` (Fern Definition) or `openapi.yml`.
2929

30-
### Global Headers
30+
<AccordionGroup>
31+
<Accordion title="Fern Definition">
3132

3233
To specify headers that are meant to be included on every request:
3334

@@ -73,11 +74,11 @@ service:
7374
If you'd like to see this feature, please upvote [this issue](https://github.com/fern-api/fern/issues/2930).
7475
</Note>
7576

76-
</Tab>
77-
<Tab title="OpenAPI">
77+
</Accordion>
78+
<Accordion title="OpenAPI">
7879

79-
### Global Headers
80-
Use the `x-fern-global-headers` extension to label additional headers as global or to alias the names of global headers:
80+
Use the `x-fern-global-headers` extension to label additional headers as global
81+
or to alias the names of global headers:
8182

8283
```yaml title="openapi.yml"
8384
x-fern-global-headers:
@@ -96,5 +97,5 @@ class Client:
9697
9798
def __init__(self, *, apiKey: str, userpoolId: typing.Optional[str])
9899
```
99-
</Tab>
100-
</Tabs>
100+
</Accordion>
101+
</AccordionGroup>

0 commit comments

Comments
 (0)