Skip to content

Commit b889919

Browse files
committed
condense page
1 parent 18e0584 commit b889919

File tree

1 file changed

+7
-23
lines changed
  • fern/products/api-def/openapi-pages/extensions

1 file changed

+7
-23
lines changed

fern/products/api-def/openapi-pages/extensions/retries.mdx

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ subtitle: Configure retry behavior for endpoints using `x-fern-retries` extensio
77
The `x-fern-retries` extension is supported in Python SDKs only.
88
</Callout>
99

10-
The `x-fern-retries` extension allows you to configure retry behavior at the endpoint level in your OpenAPI specification. This gives you fine-grained control over how the generated SDK handles retries for specific endpoints, overriding any user-defined or default retry configuration.
10+
The `x-fern-retries` extension configures retry behavior per endpoint in your OpenAPI specification, overriding any
11+
retry settings configured by SDK users. Use it to disable retries for non-idempotent operations like payment
12+
processing or order creation.
1113

12-
## Disable retries
14+
To disable retries for specific endpoints, set `disabled: true`.
1315

14-
To disable retries for a specific endpoint, set `disabled: true`:
15-
16-
```yaml title="openapi.yml" {4-5}
16+
```yaml title="openapi.yml" {4-5,15-16}
1717
paths:
1818
/plants/{plantId}:
1919
get:
@@ -26,24 +26,6 @@ paths:
2626
required: true
2727
schema:
2828
type: string
29-
```
30-
31-
When retries are disabled at the endpoint level, the generated SDK won't retry failed requests to that endpoint, regardless of the SDK's user custom configuration.
32-
33-
## Use cases
34-
35-
The `x-fern-retries` extension is useful when you want to:
36-
37-
- **Disable retries for non-idempotent operations**: Prevent automatic retries on endpoints that shouldn't be retried, such as payment processing or order creation endpoints
38-
- **Override user configuration**: Ensure specific endpoints never retry, even if the end user has configured global retry settings in their SDK client
39-
- **Control retry behavior per endpoint**: Apply different retry strategies to different parts of your API based on their characteristics
40-
41-
## Example: Disable retries for a POST endpoint
42-
43-
This example disables retries for a plant creation endpoint to prevent duplicate entries:
44-
45-
```yaml title="openapi.yml" {4-5}
46-
paths:
4729
/plants:
4830
post:
4931
x-fern-retries:
@@ -64,3 +46,5 @@ paths:
6446
'201':
6547
description: Plant created successfully
6648
```
49+
50+
When retries are disabled at the endpoint level, the generated SDK won't retry failed requests to that endpoint, regardless of the SDK's user custom configuration.

0 commit comments

Comments
 (0)