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

Extending - support MQTT - question #553

Closed
ghost opened this issue Feb 4, 2016 · 17 comments
Closed

Extending - support MQTT - question #553

ghost opened this issue Feb 4, 2016 · 17 comments

Comments

@ghost
Copy link

ghost commented Feb 4, 2016

Is it reasonable to write an extension that supports MQTT protocol in API definition?

It's required for IoT project, where both HTTP Rest and MQTT are primary protocols.

I need to generate nice looking documentation with SUBSCRIBE, PUBLISH etc, topic names, patters, json schemas. Looking similar to swagger generated documentation for REST services?

Does it even make sense?

@cbornet
Copy link

cbornet commented Feb 8, 2016

MQTT being a PUBLISH/SUBSCRIBE protocol, I don't think it fits well to an "API" description which describes a REQUEST/RESPONSE protocol.
In the IoT world, I think you could describe a CoAP API with OpenAPI.

@casualjim
Copy link
Contributor

None the less publish subscribe is a very valid thing also for server sent events, websockets etc. imo OAI should support more than just request/response message flows because http already does more.

Something like this might work for it
#396

@ghost
Copy link
Author

ghost commented Feb 9, 2016

Generating documention works and looks good if I just replace GET/POST with PUBLISH/SUBSCRIBE , just gives some warnings.

It's probably not the way to go..

@lieldulev
Copy link

👍

I do think this issue is the same as #55 and #396.

@fehguy
Copy link
Contributor

fehguy commented Mar 1, 2016

Parent issue #586

@gioppoluca
Copy link

+1 on this, is there anyone working on this?

@fehguy
Copy link
Contributor

fehguy commented Jul 7, 2016

@gioppoluca I do not expect this will be part of 3.0, but it is in the list for future versions.

@akauppi
Copy link

akauppi commented Dec 27, 2016

Valid question and answers, got links, work ongoing in other issues. Can this one be closed?

@fmvilas
Copy link

fmvilas commented May 16, 2017

@piotrmach you might be interested in the AsyncAPI specification: asyncapi.com. It's intended for the purpose you mentioned.

@xdvarpunen
Copy link

@fmvilas Asyncapi looks promising.

@fmvilas
Copy link

fmvilas commented Jan 26, 2018

Thanks @xdvarpunen. We'll be launching version 2 soon. Stay tuned!

@AtosNicoS
Copy link

Is there any progress in this issue? Maybe the asyncapi project/ideas can be integrated into the openapi spec?

@fmvilas
Copy link

fmvilas commented Jul 18, 2018

Hi @AtosNicoS. We've been discussing if and how to integrate both. So far, the only thing I can tell you is that it's going to take time, if ever happens.

In the meantime, let me know if I can help you with AsyncAPI. You can open an issue in our GitHub repo and/or join the Slack channel: https://async-apis-slack.herokuapp.com.

@fmvilas
Copy link

fmvilas commented Jul 18, 2018

Sorry, I just saw you commented there. Keep the questions coming!

@AtosNicoS
Copy link

Now that I've tried asyncapi I must say that it is just great! I've looked through both specifications now, and I dont see that much problems of adding the asyncapi parts to the openapi spec.

@fmvilas Why not open a PR with the changes you made for asyncapi? This way we can track the differences between those two APIs better and avoid going too strong into different directions.

I think it would make a lot of sense to merge the two. Better now than later, when changes become even larger. It would also make the tooling more simple, as you dont need to rewrit everything for asyncapi, and rest and mqtt API do use similar styles.

@fmvilas
Copy link

fmvilas commented Jul 20, 2018

We indeed had conversations about merging both, but the conclusion was that it would be a very bad idea, especially for tooling. Can you imagine yourself having to create a tool that will allow you to create/document/test/whatever HTTP APIs, MQTT APIs, WebSockets APIs, Kafka APIs, AMQP APIs, and a veeeery long etc?

We'll do our best to keep both in sync. Definitely @MikeRalphson is helping with that.

This is an old issue, and one of the reasons I started AsyncAPI.

@lornajane
Copy link
Contributor

I'm going to add a strong recommendation for AsyncAPI and close this long-standing issue. I can't see us adding MQTT support into OpenAPI itself, but there are lots of people using and contributing to both projects and they will remain good sister standards!

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

No branches or pull requests