-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
Can a full REST API, assume all the HTTP Methods are used, for a single URL be documented? #813
Comments
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request. |
Hi @upsampled ! Unfortunately, there is no way right now to declare multiple operations of the same type (publish/subscribe) in the same channel. The first workaround I thought about but that it's not possible to do in your case is to create several channels. But in your case, you need to declare those several HTTP Methods to a single path on your API. Since channels are identified by their address atm, you won't be able to create any other. (btw, this is also fixed in 3.0.0 by: Let channels be identified by an ID rather than their address.) Maybe other colleagues have a workaround for your case cc @magicmatatjahu @fmvilas @derberg @dalelane |
If you agree @upsampled, could we close this issue? @derberg |
Closing ticket but would definitely suggest this be marked as a use case/example for the v3 release. Lots of REST projects out there that could be extended cleanly with Async API. |
@upsampled there is some WIP PR that might solve your issue: asyncapi/bindings#131, but I'm not pretty sure if it will move forward TBH. |
I like AsyncAPI because it embraces multiple protocols, specifically websockets which i use often. The problem is that I still have the document the legacy REST APIs in order to extend them and I cannot document all the HTTP Methods they support.
Right now I have only been able to assign one HTTP method to subscribe and publish. Subscribe can probably just stay associated with GET, but publish really needs to be associated with PUT, POST, PATCH, DELETE. I realize you can try to get around the two method restriction with REST call that have arguments in the URL (IE:
/v1/bus/{id}
), but that doesn't help me if I am documenting an API that was already created with only query arguments.The text was updated successfully, but these errors were encountered: