You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello.
I have set up drf-yasg on my drf project. I have an issue using login required APIs.
I've wrote a custom permission class called MyCustomPerm which inherits from BasePermission and overrides has_permission method. This method reads authorization header and authenticates it against JWT and sets user phone_number on request, then returns True/False considering the fact that user is authenticated or not.
The problem is that Swagger UI doesn't show the APIs that have this permission class:
permission_classes = [
MyCustomPerm,
]
(My views are class based)
How can I do that?
Thank you very much.
The text was updated successfully, but these errors were encountered:
Hello.
I have set up drf-yasg on my drf project. I have an issue using login required APIs.
I've wrote a custom permission class called MyCustomPerm which inherits from BasePermission and overrides has_permission method. This method reads authorization header and authenticates it against JWT and sets user phone_number on request, then returns True/False considering the fact that user is authenticated or not.
The problem is that Swagger UI doesn't show the APIs that have this permission class:
(My views are class based)
How can I do that?
Thank you very much.
The text was updated successfully, but these errors were encountered: