Forum Discussion

pathikmehta's avatar
pathikmehta
Occasional Visitor
5 years ago

Can I use swagger to document websockets?

I saw a previous topic similar to this one but I don't see any conclusion on that and was archived so creating new one.

 

I have a some WebSocket implementation in my spring boot application and I also many other REST APIs implemented in same app and I am using Swagger API documentation for all those REST API documentation.

 

Now I want to use Swagger documentation for WebSocket in the same application but did not find out much so far.

 

Does swagger support Websocket documentation? If yes, where can I find some examples and all?

 

Thank you

1 Reply

  • OpenAPI Specification and Swagger tools aren't really suitable for WebSocket APIs.

     

    Check out AsyncAPI instead. AsyncAPI is very similar to the OpenAPI Specification but designed specifically for event-driven messaging APIs, including WebSocket APIs.