Somebody
Somebody

Reputation: 9645

Describe websocket api via Swagger

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?

Upvotes: 54

Views: 51906

Answers (2)

Benjamin Soulier
Benjamin Soulier

Reputation: 2263

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.

Upvotes: 13

Nikhil VJ
Nikhil VJ

Reputation: 6112

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.

Upvotes: 3

Related Questions