We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 332af9f commit a34a9f8Copy full SHA for a34a9f8
1 file changed
server/balancer_backend/urls.py
@@ -6,6 +6,9 @@
6
# Import TemplateView for rendering templates
7
from django.views.generic import TemplateView
8
import importlib # Import the importlib module for dynamic module importing
9
+from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView, SpectacularRedocView
10
+
11
12
13
# Define a list of URL patterns for the application
14
# Keep admin outside /api/ prefix
@@ -50,6 +53,9 @@
50
53
# Wrap all API routes under /api/ prefix
51
54
urlpatterns += [
52
55
path("api/", include(api_urlpatterns)),
56
+ path("api/schema/", SpectacularAPIView.as_view(), name="schema"),
57
+ path("api/docs/", SpectacularSwaggerView.as_view(url_name="schema"), name="swagger-ui"),
58
+ path("api/redoc/", SpectacularRedocView.as_view(url_name="schema"), name="redoc"),
59
]
60
61
import os
0 commit comments