We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a api view. I want to show fields in docs. Do we need a decorator to show fields in docs?
@api_view(['POST']) @permission_classes((AllowAny, )) @throttle_classes([AnonRateThrottle]) @api.doc(fields={'email': 'CharField', 'password':'CharField'}) def change_password(request): signed_email = request.data.get('email', '') password = request.data.get('password', '') try: email = loads(urlunquote(signed_email)) except BadSignature: return Response(status=status.HTTP_400_BAD_REQUEST) if len(password) < 6: return Response(status=status.HTTP_400_BAD_REQUEST) if not User.objects.filter(username=email): return Response(status=status.HTTP_404_NOT_FOUND) user = User.objects.get(username=email) user.set_password(password) user.save() return Response(status=status.HTTP_200_OK)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have a api view. I want to show fields in docs. Do we need a decorator to show fields in docs?
The text was updated successfully, but these errors were encountered: