Skip to content

Commit fb3c18e

Browse files
committed
some additional small edits
1 parent f03e4b8 commit fb3c18e

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

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

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ 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 pulls out headers that are used in every request, or the
9+
Fern automatically identifies headers that are used in every request, or the
1010
majority of requests, and marks them as global. You can manually configure additional
11-
headers as global in either `api.yml` (Fern Definition) or `openapi.yml`.
11+
global headers in either `api.yml` (Fern Definition) or `openapi.yml`.
1212

13-
Once you configure a global header, Fern generates an SDK that accepts this as a
14-
constructor parameter. Users can then provide the value once, and the generated
15-
SDK automatically includes the header in all their API calls:
13+
Once you configure a global header (either automatically detected or manually
14+
specified), Fern generates an SDK that accepts this as a constructor parameter.
15+
Users can then provide the value once, and the generated SDK automatically
16+
includes the header in all their API calls:
1617

1718
```python
1819
import os
@@ -21,10 +22,12 @@ class Client:
2122

2223
def __init__(self, *, apiKey: str):
2324
```
25+
26+
## Specifying Global Headers in a Fern Definition or OpenAPI spec
2427
<Tabs>
2528
<Tab title="Fern Definition">
2629

27-
## Global Headers
30+
### Global Headers
2831

2932
To specify headers that are meant to be included on every request:
3033

@@ -36,7 +39,7 @@ headers:
3639
```
3740
</CodeBlock>
3841
39-
## Global path parameters
42+
### Global path parameters
4043
You can also specify path parameters that are meant to be included on every request:
4144
4245
<CodeBlock title="api.yml">
@@ -49,7 +52,7 @@ path-parameters:
4952
```
5053
</CodeBlock>
5154
52-
### Overriding the base path
55+
#### Overriding the base path
5356
5457
If you have certain endpoints that do not live at the configured `base-path`, you can
5558
override the `base-path` at the endpoint level.
@@ -73,7 +76,7 @@ If you'd like to see this feature, please upvote [this issue](https://github.com
7376
</Tab>
7477
<Tab title="OpenAPI">
7578

76-
## Global Headers
79+
### Global Headers
7780
Use the `x-fern-global-headers` extension to label additional headers as global or to alias the names of global headers:
7881

7982
```yaml title="openapi.yml"
@@ -84,7 +87,7 @@ x-fern-global-headers:
8487
optional: true
8588
```
8689

87-
yields the following client:
90+
This configuration yields the following client:
8891

8992
```python
9093
import os

0 commit comments

Comments
 (0)