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

Add support for coap scheme #104

Closed
wants to merge 1 commit into from
Closed

Conversation

MikeRalphson
Copy link
Contributor

Adds support for the Constrained Application Protocol CoAP as a scheme.

Also add missing jms value from scheme description.

@fmvilas
Copy link
Member

fmvilas commented Jan 23, 2019

But, how do you plan to add support to CoAP in AsyncAPI? AFAIK, it has the same semantics as HTTP, i.e., GET, PUT, POST, etc. We only have publish and subscribe. Am I missing something?

@MikeRalphson
Copy link
Contributor Author

It can be translated to/from HTTP, but the core is a UDP multicast protocol. So although it's brokerless, and subscribing might be better termed filtering, I think it does fit the ethos of AsyncAPI. No matter if it's too much of a stretch for v2.

@fmvilas
Copy link
Member

fmvilas commented Jan 23, 2019

The underlying protocol is UDP, but my guess is that people would want to describe the operations (GET, POST, PUT, etc.) in the AsyncAPI file, don't you think? The same way OpenAPI describes HTTP and not TCP, even though it's over TCP. Could you provide an example AsyncAPI document of how you see both, AsyncAPI and CoAP, playing together? It's just for me to be able to see it 🤔

@MikeRalphson
Copy link
Contributor Author

OK, will do. The library I'm using abstracts away the HTTP semantics, so I will see if it has a lower layer to play with. I'll report back.

@MikeRalphson
Copy link
Contributor Author

Agreed this is a better fit for OpenAPI. Will resubmit just the missing jms entry in the scheme description.

@beriberikix
Copy link

👋 new to AsyncAPI but a user of CoAP. Agree that the request-response parts of CoAP can mostly be captured via OAS but as Mike mentioned the "group communication" feels inline with the spirit of AsyncAPI. The initial CoAP RFC 7252 didn't go into much detail on how to use multicast but RFC7390 does and is what most people are implementing.

I need to dig deeper into how to translate the RFC into an AsyncAPI example but I've reaching out to the CoAP WG for feedback.

P.S. is there a shorthand for AsyncAPI like OAS? 😃

@derberg
Copy link
Member

derberg commented Apr 23, 2020

@beriberikix thanks for looking into it

I saw someone one day on twitter wrote AAS but that looks/sounds weird 😄

@pdgendt
Copy link

pdgendt commented Nov 13, 2023

Just bumped into this (old) PR, any chance the current (2.6.0) spec would be able to describe CoAP resources, OAS seems to be a lesser fit with regards to the group communication an also observable resources.

@jonaslagoni
Copy link
Member

This might be perfect for v3 of AsyncAPI as we now support request/reply pattern i.e. enable http protocols better.

@pdgendt @beriberikix if you want this, I would suggest to create an issue for it, and then if you are up for it, champion the change in maybe v3.1? 🤔

@jonaslagoni
Copy link
Member

This might be perfect for v3 of AsyncAPI as we now support request/reply pattern i.e. enable http protocols better.

@pdgendt @beriberikix if you want this, I would suggest to create an issue for it, and then if you are up for it, champion the change in maybe v3.1? 🤔

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

Successfully merging this pull request may close these issues.

6 participants