-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
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
/login username parameter isn't displayed by swagger-ui #41
Comments
Thanks for submitting this issue. As far as I can see it's the same problem for |
It's probably because username is not defined in serializer, as User.USERNAME_FIELD is used instead, which is correct. I don't see easy solution to this. |
As far as I know after initial research some time ago there is an option to add doc strings to serializers that django-rest-swagger should be able to parse and generate appropriate JSON schema. |
Any idea on when there might be a fix for this? |
DRF API docs correctly show the |
This involves multiple packages, and I'm not sure where the issue lies. I'll start here. :-)
Using...
I find that the "username" parameter for the /login endpoint isn't displayed in the swagger-ui documentation. "Password" is there, but username is not:
In djoser.serializers.UserLoginSerializer.Meta.fields, "username" is not listed as a field. The username is manually picked off through User.USERNAME_FIELD, but Django Rest Swagger can't find that reference and so isn't aware of the username parameter.
The text was updated successfully, but these errors were encountered: