Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Describe WebSockets with AsyncAPI #189

Open
dgarcia360 opened this issue Aug 4, 2020 · 4 comments
Open

Describe WebSockets with AsyncAPI #189

dgarcia360 opened this issue Aug 4, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@dgarcia360
Copy link
Contributor

WebSockets are currently not documented in a formal language, making it difficult to discuss enhancements and share a contract between REST and SDKs.

The AsyncAPI Specification allows describing document message-driven APIs in a machine-readable format in a similar way we are using OpenAPI for REST endpoints.

More info: https://www.asyncapi.com/docs/specifications/2.0.0/

Current WebSockets spec: https://docs.symbolplatform.com/api.html#websockets

@dgarcia360 dgarcia360 added the enhancement New feature or request label Aug 4, 2020
@Vektrat
Copy link
Contributor

Vektrat commented Aug 4, 2020

is it worth it? we have such a little offer of WS interface... and we do have a a formal document description https://docs.symbolplatform.com/api.html#websockets

@fboucquez
Copy link
Contributor

fboucquez commented Aug 4, 2020

Can this be integrated to open API and the generators? Or just a more formalized documentation? I think it worths having a look.

@dgarcia360
Copy link
Contributor Author

dgarcia360 commented Aug 4, 2020

AsyncAPI cannot be integrated directly into OpenAPI. In fact, the initiative was born because OpenAPI does not support describing message-driven APIs. Public-facing docs can be generated from the definitions with https://github.com/asyncapi/generator

@fboucquez
Copy link
Contributor

If it's not integrated out of the box it doesn't worth having the extra infrastructure to generate the docs and code just for WS.

Updating https://docs.symbolplatform.com/api.html#websockets with the payload wrapper from symbol/catapult-rest#309 would do the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants