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
{{ message }}
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.
However i get this error 'AutoSchema' object has no attribute 'get_link' when i visit localhost:8000/
heres the trace:
Traceback (most recent call last):
File "C:\projects\pocs\python-pi\venv\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "C:\projects\pocs\python-pi\venv\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "C:\projects\pocs\python-pi\venv\lib\site-packages\django\core\handlers\base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\projects\pocs\python-pi\venv\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "C:\projects\pocs\python-pi\venv\lib\site-packages\django\views\generic\base.py", line 71, in view
return self.dispatch(request, *args, **kwargs)
File "C:\projects\pocs\python-pi\venv\lib\site-packages\rest_framework\views.py", line 497, in dispatch
response = self.handle_exception(exc)
File "C:\projects\pocs\python-pi\venv\lib\site-packages\rest_framework\views.py", line 457, in handle_exception
self.raise_uncaught_exception(exc)
File "C:\projects\pocs\python-pi\venv\lib\site-packages\rest_framework\views.py", line 468, in raise_uncaught_exception
raise exc
File "C:\projects\pocs\python-pi\venv\lib\site-packages\rest_framework\views.py", line 494, in dispatch
response = handler(request, *args, **kwargs)
File "C:\projects\pocs\python-pi\venv\lib\site-packages\rest_framework_swagger\views.py", line 32, in get
schema = generator.get_schema(request=request)
File "C:\projects\pocs\python-pi\venv\lib\site-packages\rest_framework\schemas\coreapi.py", line 153, in get_schema
links = self.get_links(None if public else request)
File "C:\projects\pocs\python-pi\venv\lib\site-packages\rest_framework\schemas\coreapi.py", line 140, in get_links
link = view.schema.get_link(path, method, base_url=self.url)
AttributeError: 'AutoSchema' object has no attribute 'get_link'
[17/Jul/2019 11:43:53] "GET / HTTP/1.1" 500 17187
what am i doing wrong?
The text was updated successfully, but these errors were encountered:
To summarize, Django Rest Framework 3.10 (released a few days ago) deprecated the CoreAPI based schema generation, and introduced the OpenAPI schema generation in its place. Currently to continue to use django-rest-swagger as is you need to re-enable the CoreAPI schema generation by adding the following config to the settings file:
Actually it looks like this project is deprecated so the better answer might be to switch to drf_yasg, this looks to work fine without the additional config.
@jhonatanTeixeira Last activity seems to be 9 months ago... so seems like this wont be updated anymore. @bmildren Thanks for the info in drf_yasg. Seems to work right out of the box without issues!
Hello, i got this configuration on my urls.py
However i get this error 'AutoSchema' object has no attribute 'get_link' when i visit localhost:8000/
heres the trace:
what am i doing wrong?
The text was updated successfully, but these errors were encountered: