mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 09:16:10 -06:00
9608 update yasg -> spectacular
This commit is contained in:
parent
590e7af995
commit
ac235b7990
@ -162,7 +162,7 @@ class ConfigContextViewSet(NetBoxModelViewSet):
|
|||||||
class ReportViewSet(ViewSet):
|
class ReportViewSet(ViewSet):
|
||||||
permission_classes = [IsAuthenticatedOrLoginNotRequired]
|
permission_classes = [IsAuthenticatedOrLoginNotRequired]
|
||||||
_ignore_model_permissions = True
|
_ignore_model_permissions = True
|
||||||
exclude_from_schema = True
|
schema = None
|
||||||
lookup_value_regex = '[^/]+' # Allow dots
|
lookup_value_regex = '[^/]+' # Allow dots
|
||||||
|
|
||||||
def _retrieve_report(self, pk):
|
def _retrieve_report(self, pk):
|
||||||
@ -269,7 +269,7 @@ class ReportViewSet(ViewSet):
|
|||||||
class ScriptViewSet(ViewSet):
|
class ScriptViewSet(ViewSet):
|
||||||
permission_classes = [IsAuthenticatedOrLoginNotRequired]
|
permission_classes = [IsAuthenticatedOrLoginNotRequired]
|
||||||
_ignore_model_permissions = True
|
_ignore_model_permissions = True
|
||||||
exclude_from_schema = True
|
schema = None
|
||||||
lookup_value_regex = '[^/]+' # Allow dots
|
lookup_value_regex = '[^/]+' # Allow dots
|
||||||
|
|
||||||
def _get_script(self, pk):
|
def _get_script(self, pk):
|
||||||
|
@ -30,7 +30,7 @@ class InstalledPluginsAPIView(APIView):
|
|||||||
"""
|
"""
|
||||||
permission_classes = [permissions.IsAdminUser]
|
permission_classes = [permissions.IsAdminUser]
|
||||||
_ignore_model_permissions = True
|
_ignore_model_permissions = True
|
||||||
exclude_from_schema = True
|
schema = None
|
||||||
|
|
||||||
def get_view_name(self):
|
def get_view_name(self):
|
||||||
return "Installed Plugins"
|
return "Installed Plugins"
|
||||||
@ -53,7 +53,7 @@ class InstalledPluginsAPIView(APIView):
|
|||||||
@extend_schema(exclude=True)
|
@extend_schema(exclude=True)
|
||||||
class PluginsAPIRootView(APIView):
|
class PluginsAPIRootView(APIView):
|
||||||
_ignore_model_permissions = True
|
_ignore_model_permissions = True
|
||||||
exclude_from_schema = True
|
schema = None
|
||||||
|
|
||||||
def get_view_name(self):
|
def get_view_name(self):
|
||||||
return "Plugins"
|
return "Plugins"
|
||||||
|
@ -13,17 +13,17 @@ from rq.worker import Worker
|
|||||||
from netbox.api.authentication import IsAuthenticatedOrLoginNotRequired
|
from netbox.api.authentication import IsAuthenticatedOrLoginNotRequired
|
||||||
|
|
||||||
|
|
||||||
@extend_schema(exclude=True)
|
|
||||||
class APIRootView(APIView):
|
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/`.
|
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
|
_ignore_model_permissions = True
|
||||||
exclude_from_schema = True
|
# schema = None
|
||||||
|
|
||||||
def get_view_name(self):
|
def get_view_name(self):
|
||||||
return "API Root"
|
return "API Root"
|
||||||
|
|
||||||
|
@extend_schema(exclude=True)
|
||||||
def get(self, request, format=None):
|
def get(self, request, format=None):
|
||||||
|
|
||||||
return Response({
|
return Response({
|
||||||
|
Loading…
Reference in New Issue
Block a user