In swagger no parameters?

Hi all, I use svagger for the test API. My serializer
class UserSerializer(serializers.ModelSerializer):
 password = serializers.CharField(write_only=True)
 email = serializers.CharField(max_length=100)

 class Meta:
 model = User
 fields = (

 def create(self, validated_data):
 # user = User.objects.create_user(**validated_data)
 # user = User.objects.create(
 # username=validated_data['username']
 # )
 # user.set_password(validated_data['password'])
 user = User.objects.create(email=validated_data['email'])
 return user

my view
class RegistrationView(APIView):

 def post(self, request, format='json'):
 serializer = UserSerializer(
 if the serializer.is_valid():
 user =
 if user:
 token = Token.objects.create(user=user)
 json =
 json['token'] = token.key
 return Response(json, status=status.HTTP_201_CREATED)

 return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)

But svagger still no fields to edit
Tell me what's wrong
June 5th 19 at 21:25
1 answer
June 5th 19 at 21:27
the view should be nasledovat class GenericAPIView

Find more questions by tags DjangoRESTful API