Gallery-Archivist/backend/api/schema/urls.py
Aroy-Art bab45566c8
Add: api schema app
add for generating OpenAPI schema and documentation
2025-02-08 18:10:28 +01:00

22 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",
),
]