Skip to content
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

Added write_only=True for better doc generation #699

Merged
merged 2 commits into from
Jun 21, 2023

Conversation

Yaser-Amiri
Copy link
Contributor

Auto doc generators can perform better and generate more accurate docs by having this argument.
Username field in TokenObtainSerializer and token in TokenVerifySerializer has been changed.

Auto doc generators can perform better and generate more accurate docs
by having this argument.
Username field in TokenObtainSerializer and token in TokenVerifySerializer
has been changed.
Copy link
Member

@Andrew-Chen-Wang Andrew-Chen-Wang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does TokenBlacklistSerializer also need write_only?

@Yaser-Amiri
Copy link
Contributor Author

Does TokenBlacklistSerializer also need write_only?

To be honest I haven't used blacklist functionality, if the response is an empty json as success (which seems it is), yes "refresh" field should be write_only too.

@Yaser-Amiri
Copy link
Contributor Author

Yaser-Amiri commented Apr 21, 2023

I checked the blacklist app and yes, refresh is write only, so I added the argument to the field.

Copy link
Member

@Andrew-Chen-Wang Andrew-Chen-Wang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@Andrew-Chen-Wang Andrew-Chen-Wang merged commit 51d2b24 into jazzband:master Jun 21, 2023
mahdirahimi1999 pushed a commit to mahdirahimi1999/djangorestframework-simplejwt that referenced this pull request Jun 26, 2023
* Added write_only=True for better doc generation

Auto doc generators can perform better and generate more accurate docs
by having this argument.
Username field in TokenObtainSerializer and token in TokenVerifySerializer
has been changed.

* Added write_only=True to TokenBlacklistSerializer's refresh field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants