Skip to content

Commit 47dbc1b

Browse files
committed
update global headers example code
1 parent 07a4588 commit 47dbc1b

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,19 @@ Alternatively, you can add headers to the `api` block in your `generators.yml` f
9999
api:
100100
- openapi: ./path/to/openapi
101101
headers:
102-
X-Version:
103-
name: version
104-
type: literal<"1234">
102+
custom_api_key:
103+
name: api_key
104+
type: string
105+
userpool_id:
106+
name: userpool_id
107+
type: optional<string>
105108
```
106109

107110
For more information, see the [`generators.yml` reference documentation](/sdks/reference/generators-yml#apiheaders).
108111

109-
### Client code
112+
#### Client con
110113

111-
This configuration yields the following client:
114+
Both of the above configurations produces the same client code:
112115

113116
```python
114117
import os
@@ -117,5 +120,7 @@ class Client:
117120
118121
def __init__(self, *, apiKey: str, userpoolId: typing.Optional[str])
119122
```
123+
124+
120125
</Accordion>
121126
</AccordionGroup>

0 commit comments

Comments
 (0)