-
Notifications
You must be signed in to change notification settings - Fork 270
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
Websocket/AsyncAPI Support #667
Comments
The canonical issue about OpenAPI itself and websockets: |
AsyncAPI can host a static Swagger UI-like browseable frontend: |
As a channels user myself, this has been cumbersome for me too.I was not aware of DCRF, so thanks for that.
probably, however I presume that DCRF/AsyncAPI will break quite a few assumptions we made concerning the OpenAPI structure itself. Not sure how much effort this is. I certainly find this interesting but lack the time to further look into it at the moment. |
As a workaround, is there any way to add components to the schema manually without using a view? |
@ford-carta not entirely sure what you intend to do, given that AsyncAPI is structured differently, but you are always free to write postprocessing hooks to mutate the schema at the end of parsing. https://drf-spectacular.readthedocs.io/en/latest/customization.html#step-6-postprocessing-hooks |
drf-spectacular
is excellent at generating OpenAPI schemas for REST APIs. Having something similar for use with websocket portions of DRF applications (via Django Channels) would be a big win for backends that also support web sockets.AsyncAPI is the OpenAPI-equivalent solution for web sockets.
djangochannelsrestframework
(DCRF) is a DRF-like interface for building APIs over websockets using Django Channels. It uses a very similar approach to DRF, so perhaps some ofdrf-spectactular
's infrastructure could be reused.Cross reference to feature request on DCRF repo:
The text was updated successfully, but these errors were encountered: