jbrown
jbrown

Reputation: 7996

Swagger for a chat server over a websocket?

I want to write a webapp that has a chat server component. I'll use swagger for my main REST API, but I also want to use something similar for a chat server over a websocket. I'm really looking for serialisation/deserialisation of messages, message validation, transport, etc. I.e. all the boring stuff.

Is it possible to use swagger for this, or can people suggest something else that might help me? At the moment the chat server is home made based on redis, but I might switch to ejabberd or something else if I can find something that does what I need.

Upvotes: 3

Views: 1457

Answers (1)

Mark
Mark

Reputation: 5777

The answer is no. Swagger provides you with a convention for documenting your API not implementing it.

As per the oficial documentation:

The goal of Swagger™ is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection.

This means that swagger in itself is used to build and visualize API documentation.

What your looking for however is not an API documenting tool. You can achieve your goal with an XMPP protocol library such as Smack. See here: http://www.igniterealtime.org/projects/smack/

Upvotes: 1

Related Questions