Generate WebSocket Reference

Fern generates WebSocket API reference documentation from your AsyncAPI specification or Fern Definition. The AsyncAPI specification describes message-driven APIs in a machine-readable format. Fern supports the v2 and v3 specifications.

See Deepgram’s configuration for a complete example.

WebSocket API Reference Example
Example of how a WebSocket API Reference renders in Fern

Configuration

  1. Add your AsyncAPI specification file (e.g., asyncapi.yml) to your /fern directory
  2. Configure your generators.yml
generators.yml
1api:
2 path: asyncapi.yml
3 origin: https://github.com/your-org/your-repo/blob/main/asyncapi.yml

Properties

path
Required

Location of your AsyncAPI specification file

origin

URL where the specification file is hosted if you want Fern to fetch it from a remote location

Common use cases

WebSockets enable real-time, bidirectional communication, making them essential for:

  • FinTech: Market data streams, trading updates, live pricing
  • Voice AI: Live transcription, real-time voice processing
  • Gaming: Multiplayer interactions, live state updates
  • Communications: Chat applications, collaboration tools
Built with