Settings

  1. Add djanog-asyncapi to INSTALLED_APPS

INSTALLED_APPS = [
    ...,
    "django_asyncapi",
]
  1. Setup configuration inside settings.py


DJANGO_ASYNCAPI = {
    "ASYNCAPI_SPEC_CLASS": "bus.routing.MySpecialServiceAsyncAPISpecV3",
}
 
  1. Add django-asyncapi urls

from django.urls import path, include

urlpatterns = [
    path('docs/', include('django_asyncapi.urls')),
]

pydantic model django_asyncapi.settings.DjangoAsyncapiSettings
Fields:
field ASYNCAPI_SPEC_CLASS: list[pydantic.types.ImportString] | ImportString [Required]

Path to class containing entrypoint for defining root of asyncapi specification