diff --git a/apps/bookmark/views/bookmark.py b/apps/bookmark/views/bookmark.py index 837f575..1a0da3e 100644 --- a/apps/bookmark/views/bookmark.py +++ b/apps/bookmark/views/bookmark.py @@ -5,6 +5,7 @@ from rest_framework.permissions import IsAuthenticated from rest_framework.generics import CreateAPIView, DestroyAPIView from rest_framework.exceptions import ValidationError from drf_yasg.utils import swagger_auto_schema +from drf_yasg import openapi from apps.bookmark.models import Bookmark from apps.bookmark.serializers import BookmarkSerializer @@ -79,7 +80,14 @@ class RemoveBookmarkView(DestroyAPIView): @swagger_auto_schema( operation_description="Deactivate a bookmark by setting its status to False using content_id and user.", - request_body=BookmarkSerializer, + request_body=openapi.Schema( + type=openapi.TYPE_OBJECT, + properties={ + 'service': openapi.Schema(type=openapi.TYPE_STRING, description='The service associated with the bookmark.'), + 'content_id': openapi.Schema(type=openapi.TYPE_STRING, description='The ID of the content to deactivate the bookmark for.') + }, + required=['service', 'content_id'] + ), responses={ 204: "Bookmark deactivated successfully.", 400: "Invalid input.",