docs: add WebSocket client generation documentation#6006
Merged
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…nguage examples, and auth section - Fix AsyncAPI spec example to use components/messages with explicit message refs on operations - Fix Python event-based example to use EventType enum instead of raw string - Add Java, C#, and Rust SDK usage examples - Add authentication section explaining header forwarding - Update AsyncAPI overview to include Rust in supported languages Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
- Fix Java/C# class names to match plantUpdates channel (was stale Realtime naming) - Fix C# example to use root client factory method (CreatePlantUpdatesApi) - Fix auth section to distinguish C# pattern from TS/Python/Java/Rust - Add one-liner explaining send method naming convention (send + operation name) - Remove unused EventType import from Python sync snippet Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
…uirement Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
|
|
||
| Fern generates typed WebSocket clients from your [AsyncAPI channel definitions](/learn/api-definitions/asyncapi/channels/pubsub). The generated clients handle connection management, typed send/receive messages, and automatic reconnection. | ||
|
|
||
| Fern generates WebSocket clients for TypeScript, Python, Java, C#, and Rust. Go generates types only, and Ruby is not yet supported. |
Contributor
There was a problem hiding this comment.
🚫 [vale] reported by reviewdog 🐶
[Microsoft.Contractions] Use 'isn't' instead of 'is not'.
devalog
approved these changes
Jun 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds WebSocket client generation documentation covering all 5 supported languages (TypeScript, Python, Java, C#, Rust).
AsyncAPI spec example: uses
components/messageswith explicitmessagesrefs on operations (required for correct send/receive association in AsyncAPI 3.0.0), consistent with existing AsyncAPI docs pages.SDK examples per language, each verified against actual seed-generated code:
socket.on(event, handler)+socket.sendSendReading(...)+socket.close()ws.recv(), iteration, event-basedws.on(EventType.MESSAGE, ...)+ws.start_listening()PlantUpdatesWebSocketClientviaclient.plantUpdates().plantUpdatesWebSocket(id),CompletableFuture-based connect/send,Consumer<T>handlers (onPlantStatus,onConnected,onError)PlantUpdatesApiviaclient.CreatePlantUpdatesApi(Options),Event<T>.Subscribe(...), overloadedSend()methods (not per-message named)client.plant_updates.create_plant_updates_connection(...), typedsend_send_reading/recv/closeSend method naming: documents the
send+ operation name convention (e.g.sendReadingoperation →sendSendReadingmethod).Auth section: TS/Python/Java/Rust auto-forward auth headers; C# requires manual configuration via
Options.AsyncAPI overview: added Rust to supported languages list.
Link to Devin session: https://app.devin.ai/sessions/fb81f997fb784d9f8b030efd69e50801