Skip to content

Commit 5c34ad1

Browse files
Mlaz-codeclaude
andauthored
docs(websocket): mark sharpapi-v1.5 as internal-only (#204)
The MessagePack subprotocol is reserved for first-party SDKs and SharpLines — it isn't part of the documented public API. Listing it in the public asyncapi spec led a customer-support agent to recommend it to a customer debugging unrelated 60s WS disconnects (already fixed server-side in sharp-api-go PR #177). Removes v1.5 from the public table and replaces the explanatory paragraph with a note that additional subprotocols exist but are not public. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 208f383 commit 5c34ad1

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

public/asyncapi.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ info:
1212
1313
## Subprotocols
1414
15-
The server negotiates one of two subprotocols on upgrade. Pass the chosen
16-
name in the `Sec-WebSocket-Protocol` header (browsers: second arg to the
17-
`WebSocket` constructor).
18-
19-
| Subprotocol | Wire format for `data` payloads | When to use |
20-
|------------------|------------------------------------------|-----------------------------------|
21-
| `sharpapi-v1` | JSON throughout | Browsers, simple clients |
22-
| `sharpapi-v1.5` | JSON control frames + MessagePack data | High-throughput servers, SDKs |
23-
24-
Both protocols deliver the same logical messages with the same field names;
25-
`sharpapi-v1.5` swaps the `data` payload binary encoding for ~30% smaller
26-
frames at the cost of needing a MessagePack decoder.
15+
Public clients negotiate `sharpapi-v1` by passing it in the
16+
`Sec-WebSocket-Protocol` header (browsers: second arg to the `WebSocket`
17+
constructor). It carries JSON throughout.
18+
19+
| Subprotocol | Wire format for `data` payloads | When to use |
20+
|---------------|---------------------------------|---------------------|
21+
| `sharpapi-v1` | JSON throughout | All public clients |
22+
23+
The server may also accept additional subprotocols reserved for first-party
24+
SDKs and internal services. Those are not part of the documented public API
25+
and may change without notice — public clients should always negotiate
26+
`sharpapi-v1`.
2727
2828
## Authentication
2929

0 commit comments

Comments
 (0)