get_websocket_app
Creates and returns an asynchronous WebSocket application function that handles dependency injection, validation, and execution for a specific endpoint.
def get_websocket_app(
dependant: Dependant,
dependency_overrides_provider: Any | null = null,
embed_body_fields: bool = false
) - > Callable[[WebSocket], Coroutine[Any, Any, Any]]
Creates and returns an asynchronous WebSocket application handler that manages dependency injection and validation for a specific endpoint.
Parameters
| Name | Type | Description |
|---|---|---|
| dependant | Dependant | The dependency model containing the endpoint function and its required parameters. |
| dependency_overrides_provider | `Any | null` = null |
| embed_body_fields | bool = false | Determines whether to treat multiple body parameters as fields within a single JSON object. |
Returns
| Type | Description |
|---|---|
Callable[[WebSocket], Coroutine[Any, Any, Any]] | An asynchronous function that processes a WebSocket connection, resolves its dependencies, and executes the underlying endpoint logic. |