21

For restful services Swagger is a standardized way to describe the interface. Is there already a way to describe Websocket interfaces?

JohnDoe
  • 2,422
  • 5
  • 29
  • 44

3 Answers3

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?

https://github.com/swagger-api/swagger-socket

Donghwan Kim
  • 1,111
  • 7
  • 18