From 519dec955dfb8e73c6e863ace301ea38dc84d9a1 Mon Sep 17 00:00:00 2001 From: Nassim Tabchiche Date: Thu, 18 Apr 2024 23:38:41 +0200 Subject: [PATCH] Add serializer_class to LoginView This allows spectacular to properly generate the docs for the endpoint --- backend/iam/knox/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/iam/knox/views.py b/backend/iam/knox/views.py index 0efaaaa62..85e890bf8 100644 --- a/backend/iam/knox/views.py +++ b/backend/iam/knox/views.py @@ -3,10 +3,12 @@ from rest_framework import permissions from rest_framework.authtoken.serializers import AuthTokenSerializer from knox.views import LoginView as KnoxLoginView +from iam.serializers import LoginSerializer class LoginView(KnoxLoginView): permission_classes = (permissions.AllowAny,) + serializer_class = LoginSerializer def post(self, request, format=None): serializer = AuthTokenSerializer(data=request.data)