Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

Wanna use swagger for websocket without REST #47

Closed
artem-korolev opened this issue Dec 7, 2015 · 1 comment
Closed

Wanna use swagger for websocket without REST #47

artem-korolev opened this issue Dec 7, 2015 · 1 comment
Labels

Comments

@artem-korolev
Copy link

Hi guys. I try to use swagger for my project. I've got the problem. The thing is that I'm do not need REST at all. All my requests do not use GET, POST or whatever request statuses. My API uses clean websocket. Totally asynchronous nature.

So my question is: how to adopt swagger for my needs. What I need to rewrite/override? or better write some plugin for it?

For example: I don't want to specify my request examples like that:

path: /api_call
get: some get request

Because I dot not use REST(no any GET, POST, ..., etc.). I want to specify it something like that:

endpoint: /api_call
request: describe what client can send
response: describe what client can receive

I noticed in specification that there are schemes available: ws, wss.. But its not documented very well..

So my question is: What are your plans to support NON-REST API, because it becomes very popular. For mobile for example.

Will be glad to speak with some swagger developer or whoever. Because I can implement some module or whatever and share it for public use. But help from swagger development team is appreciated.

Thank you in advance,
Artem

@elakito
Copy link
Collaborator

elakito commented Dec 10, 2015

It looks like you are asking for the standard API description for non-rest services, namely pure websocket services. swagger-scket is a transport protocol to invoke REST services over a websocket and it is inherently bound to REST. This swagger-socket approach has some overhead compared to the pure websocket approach but has advantages of being able to reuse the existing REST services and also supporting both http and websocket and potentially other fallback protocols at the same time for the same services.

In contrast, swagger-core covers the API aspect and is responsible for creating the swagger API documents and currently these are also intended for REST services. But there can be a future extension to describe pure websocket based services (although, I don't know if there is much to describe for websocket cases, as most of the logic may be probably hidden).

In any case, I would suggest you to place your question to the swagger-api mailing list instead of here to get more wider audience. So, unless your question is direct to swagger-socket, I would like to close this ticket.

regards, aki

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants