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
Importing SwaggerAutoSchema removes the custom DRF parameter DEFAULT_AUTHENTICATION_CLASSES
Am I missing something?
Importing SwaggerAutoSchema anywhere in the project removes the custom DRF parameter DEFAULT_AUTHENTICATION_CLASSES.
I imported it to overload some behavior that generates docstring.
Not sure
Using custom auth class in the DRF settings
REST_FRAMEWORK = { "DEFAULT_AUTHENTICATION_CLASSES": ( "user.authentication.CustomOAuth2Authentication", ) }
Import class anywhere in project code
from drf_yasg.inspectors.view import SwaggerAutoSchema
Inspecting base APIView class in DRF source code (method get_authenticators)
APIView
get_authenticators
I can clearly trace that before the import there was:
[<class 'user.authentication.CustomOAuth2Authentication'>]
and after the import there are:
[<class 'rest_framework.authentication.SessionAuthentication'>, <class 'rest_framework.authentication.BasicAuthentication'>]
drf-yasg==1.21.5 djangorestframework==3.14.0 Django==3.2
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug Report
Importing SwaggerAutoSchema removes the custom DRF parameter DEFAULT_AUTHENTICATION_CLASSES
Am I missing something?
Description
Importing SwaggerAutoSchema anywhere in the project removes the custom DRF parameter DEFAULT_AUTHENTICATION_CLASSES.
I imported it to overload some behavior that generates docstring.
Is this a regression?
Not sure
Minimal Reproduction
Using custom auth class in the DRF settings
Import class anywhere in project code
Inspecting base
APIView
class in DRF source code (methodget_authenticators
)I can clearly trace that before the import there was:
and after the import there are:
Your Environment
The text was updated successfully, but these errors were encountered: