diff --git a/netbox/extras/api/views.py b/netbox/extras/api/views.py index 1423824cd..edf483482 100644 --- a/netbox/extras/api/views.py +++ b/netbox/extras/api/views.py @@ -162,7 +162,7 @@ class ConfigContextViewSet(NetBoxModelViewSet): class ReportViewSet(ViewSet): permission_classes = [IsAuthenticatedOrLoginNotRequired] _ignore_model_permissions = True - exclude_from_schema = True + schema = None lookup_value_regex = '[^/]+' # Allow dots def _retrieve_report(self, pk): @@ -269,7 +269,7 @@ class ReportViewSet(ViewSet): class ScriptViewSet(ViewSet): permission_classes = [IsAuthenticatedOrLoginNotRequired] _ignore_model_permissions = True - exclude_from_schema = True + schema = None lookup_value_regex = '[^/]+' # Allow dots def _get_script(self, pk): diff --git a/netbox/extras/plugins/views.py b/netbox/extras/plugins/views.py index db615cb8a..5971f78ef 100644 --- a/netbox/extras/plugins/views.py +++ b/netbox/extras/plugins/views.py @@ -30,7 +30,7 @@ class InstalledPluginsAPIView(APIView): """ permission_classes = [permissions.IsAdminUser] _ignore_model_permissions = True - exclude_from_schema = True + schema = None def get_view_name(self): return "Installed Plugins" @@ -53,7 +53,7 @@ class InstalledPluginsAPIView(APIView): @extend_schema(exclude=True) class PluginsAPIRootView(APIView): _ignore_model_permissions = True - exclude_from_schema = True + schema = None def get_view_name(self): return "Plugins" diff --git a/netbox/netbox/api/views.py b/netbox/netbox/api/views.py index c410f3ca5..51f1e5cd4 100644 --- a/netbox/netbox/api/views.py +++ b/netbox/netbox/api/views.py @@ -13,17 +13,17 @@ from rq.worker import Worker from netbox.api.authentication import IsAuthenticatedOrLoginNotRequired -@extend_schema(exclude=True) class APIRootView(APIView): """ This is the root of NetBox's REST API. API endpoints are arranged by app and model name; e.g. `/api/dcim/sites/`. """ _ignore_model_permissions = True - exclude_from_schema = True + # schema = None def get_view_name(self): return "API Root" + @extend_schema(exclude=True) def get(self, request, format=None): return Response({