UPDATE
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
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
|
||||
Reference in New Issue
Block a user