How to describe WebSocket interface?

Possibly ASyncAPI? I haven't tried it myself yet, but:

AsyncAPI provides a specification that allows you to define Message-Driven APIs in a machine-readable format. It’s protocol-agnostic, so you can use it for APIs that work over MQTT, AMQP, WebSockets, STOMP, etc. The spec is very similar to OpenAPI/Swagger so, if you’re familiar with them, AsyncAPI should be easy for you.


Not at the moment. You may want to join the following discussion about supporting Websocket in the next version of OpenAPI/Swagger spec:

https://github.com/OAI/OpenAPI-Specification/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+Websocket