47

Is it possible to describe Websocket server api via Swagger?

We have events broadcasting via websocket server and i want to describe them via one swagger specification file.

Is there any documentation generators for websockets?

Laurel
  • 5,965
  • 14
  • 31
  • 57
Somebody
  • 9,316
  • 26
  • 94
  • 142

2 Answers2

11

It seems to be possible using swagger-socket.

Still, it seems that only a Java/Scala server implementation exists for now, which means they are not as much codegens for this that there is for "standard" Swagger REST services.

Edit: As pointed out, this project seems to be dead. Unfortunately at the time of updating this answer, it does not seem that Swagger is a good tooling for type web-socket messages.

Benjamin Soulier
  • 2,223
  • 1
  • 18
  • 30
3

Not a documentation generator but this does do documentation of sockets

Firecamp - https://firecamp.io/ is like Postman but also does websocket and socketio connections. So you can document the socket connection there and export it in a collection same as we would with APIs in Postman.

Nikhil VJ
  • 5,630
  • 7
  • 34
  • 55