For restful services Swagger is a standardized way to describe the interface. Is there already a way to describe Websocket interfaces?
Asked
Active
Viewed 1.9k times
3 Answers
13
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

William Cheng
- 10,137
- 5
- 54
- 79
11
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.

parsley72
- 8,449
- 8
- 65
- 98
-3
What about swagger-socket project?

Donghwan Kim
- 1,111
- 7
- 18
-
4I had a glance at the project's README and I don't see it answering the question on how to represent Websocket within a Swagger document. Did I miss something? – akauppi Dec 27 '16 at 21:42
-
3Looks like Swagger Socket is not about documentation – Sonique Dec 26 '19 at 17:59
-
1unfortunately now archived and no longer maintained – mbx Sep 28 '20 at 08:18