Skip to content

Commit 5d06242

Browse files
committed
Update configuration.mdx based on issue #266
1 parent 58ae9f5 commit 5d06242

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

fern/products/sdks/overview/python/configuration.mdx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ groups:
1111
local:
1212
generators:
1313
- name: fernapi/fern-python
14-
version: 0.7.1
14+
version: ^4.24.0 # Required for SDK variables support
1515
config:
1616
client:
1717
class_name: "YourClient"
@@ -23,6 +23,10 @@ groups:
2323
</ParamField>
2424
2525
<ParamField path="client" type="ClientConfiguration" default="ClientConfiguration()" required={false} toc={true}>
26+
The client configuration object allows you to customize the generated client class. Available options:
27+
28+
- `class_name`: Name of the generated client class
29+
- `sdk_variables`: Automatically inject variables into endpoint paths from client initialization
2630
</ParamField>
2731

2832
<ParamField path="default_bytes_stream_chunk_size" type="number" default="null" required={false} toc={true}>
@@ -32,6 +36,19 @@ groups:
3236
<ParamField path="exclude_types_from_init_exports" type="bool" default="false" required={false} toc={true}>
3337
</ParamField>
3438

39+
<ParamField path="extension_headers" type="object" default="{}" required={false} toc={true}>
40+
Add custom extension headers to API requests. Headers can be specified in OpenAPI using `x-fern-sdk-variables`. For example:
41+
42+
```yaml
43+
x-fern-sdk-variables:
44+
project_id:
45+
type: string
46+
description: "The project ID to use for all requests"
47+
```
48+
49+
The variable will be automatically injected into endpoint paths that contain the matching parameter name.
50+
</ParamField>
51+
3552
<ParamField path="extra_dependencies" type="object" default="{}" required={false} toc={true}>
3653
If you want to add custom dependencies to your generated SDK, you can specify them using this configuration. For example, to add a dependency on boto3, your config would look like:
3754
```

0 commit comments

Comments
 (0)