Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions fern/products/api-def/asyncapi-pages/extensions/retry.mdx
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
---
title: Retry behavior
description: Configure retry behavior for operations using `x-fern-retry` extension
description: The `x-fern-retries` extension is not supported for AsyncAPI
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Contractions] Use 'isn't' instead of 'is not'.

---

Configure retry behavior for operations:
<Callout intent="warning">
The `x-fern-retries` extension is **not supported** for AsyncAPI WebSocket channels. Retry configuration is only available for OpenAPI HTTP endpoints. If you use this extension in your AsyncAPI specification, it will be ignored and a warning will be emitted during import.
</Callout>

```yaml title="asyncapi.yml" {6-10}
For retry configuration on HTTP endpoints, use the [`x-fern-retries` extension in OpenAPI](/api-definition/openapi/extensions/retries) instead.

## Why retries aren't supported for AsyncAPI

AsyncAPI specifications define WebSocket channels, which are persistent, bidirectional connections. Unlike HTTP requests that follow a request-response pattern where retry logic is meaningful, WebSocket connections maintain a continuous connection where retry semantics don't apply in the same way.

## Example (not supported)

The following example shows the `x-fern-retries` extension in an AsyncAPI specification. This will emit a warning during import and the extension will be ignored:

```yaml title="asyncapi.yml" {6-7}
operations:
sendCriticalAlert:
action: send
channel:
$ref: '#/channels/alerts'
x-fern-retry:
max_attempts: 3
exponential_backoff: true
initial_delay: 1000
max_delay: 30000
```
x-fern-retries:
disabled: true
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## 1.2.0
**`(feat):`** Show AI example generation progress in the spinner line. When generating AI examples, the spinner displays "generating AI examples for {API name} - X/Y" to track progress without creating terminal noise.
**`(feat):`** Show AI example generation progress in the spinner line. When generating AI examples, the spinner displays "generating AI examples for \{API name\} - X/Y" to track progress without creating terminal noise.


## 1.0.5
Expand Down
Loading