Skip to content

Commit

Permalink
17066 fix put/patch for Script OpenAPI docs
Browse files Browse the repository at this point in the history
  • Loading branch information
arthanson authored and jeremystretch committed Sep 9, 2024
1 parent 7ab2ebc commit aca693b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions netbox/extras/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from django.shortcuts import get_object_or_404
from django.utils.module_loading import import_string
from django_rq.queues import get_connection
from drf_spectacular.utils import extend_schema, extend_schema_view
from rest_framework import status
from rest_framework.decorators import action
from rest_framework.exceptions import PermissionDenied
Expand Down Expand Up @@ -229,6 +230,10 @@ def render(self, request, pk):
# Scripts
#

@extend_schema_view(
update=extend_schema(request=serializers.ScriptInputSerializer),
partial_update=extend_schema(request=serializers.ScriptInputSerializer),
)
class ScriptViewSet(ModelViewSet):
permission_classes = [IsAuthenticatedOrLoginNotRequired]
queryset = Script.objects.prefetch_related('jobs')
Expand Down

0 comments on commit aca693b

Please sign in to comment.