23 lines
483 B
Python
23 lines
483 B
Python
|
from django.urls import path
|
||
|
|
||
|
from drf_spectacular.views import (
|
||
|
SpectacularAPIView,
|
||
|
SpectacularRedocView,
|
||
|
SpectacularSwaggerView,
|
||
|
)
|
||
|
|
||
|
urlpatterns = [
|
||
|
path("", SpectacularAPIView.as_view(), name="schema"),
|
||
|
# Optional UI:
|
||
|
path(
|
||
|
"swagger-ui/",
|
||
|
SpectacularSwaggerView.as_view(url_name="schema"),
|
||
|
name="swagger-ui",
|
||
|
),
|
||
|
path(
|
||
|
"redoc/",
|
||
|
SpectacularRedocView.as_view(url_name="schema"),
|
||
|
name="redoc",
|
||
|
),
|
||
|
]
|