Closed HMaker closed 3 weeks ago
The library does not support nested URLRouters, it expects all path() declarations to end with a Consumer. The following breaks it:
path()
application = ProtocolTypeRouter({ "websocket": URLRouter([ path('my/app/', URLRouter([ # <== nested URLRouter, drf-spectacular-websocket expects a Consumer path('consumer1/', MyConsumer1.as_asgi()), path('consumer2/', MyConsumer2.as_asgi()), path('consumer3/', MyConsumer3.as_asgi()), ])), ]) })
Nested URLRouters allow one to easily change the base URL of a set of endpointss (e.g. change per Django application). It makes namespaces way easier to manage.
I'll think about what I can do about it
Added support for nested routes https://github.com/Friskes/drf-spectacular-websocket/releases/tag/v1.2.8
The library does not support nested URLRouters, it expects all
path()
declarations to end with a Consumer. The following breaks it:Nested URLRouters allow one to easily change the base URL of a set of endpointss (e.g. change per Django application). It makes namespaces way easier to manage.