I am trying to browse the api documentation of rest framework swagger. but getting error AttributeError: 'AutoSchema' object has no attribute 'get_link
I have used django rest framework swagger. but not able to browse the documentation.
from django.contrib import admin
from django.urls import path, include
from rest_framework_swagger.views import get_swagger_view
schema_view = get_swagger_view(title='API')
urlpatterns = [
path('admin/', admin.site.urls),
path('api/', include('auth.urls')),
path('docs/', schema_view),
]
add below line in settings.py
REST_FRAMEWORK = {'DEFAULT_SCHEMA_CLASS':'rest_framework.schemas.coreapi.AutoSchema' }
djagno-rest-swagger
is deprecated and suggests to use drf-yasg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With