Files
Ai/drf_spectacular/views.py
T
2026-05-05 01:46:10 +03:30

20 lines
408 B
Python

from django.http import HttpResponseNotFound
from django.views import View
class _DisabledSchemaView(View):
def dispatch(self, request, *args, **kwargs):
return HttpResponseNotFound("Schema endpoint is disabled.")
class SpectacularAPIView(_DisabledSchemaView):
pass
class SpectacularSwaggerView(_DisabledSchemaView):
pass
class SpectacularRedocView(_DisabledSchemaView):
pass