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 Apr 22, 2020. It is now read-only.
I tried to add drf_openapi to an existing project.
What I Did
I have added drf-openapi==1.3.0 to my requirements.txt and installed it. I've added 'drf_openapi', to INSTALLED_APPS and url(r'^/docs/', include('drf_openapi.urls')) to the urlpatterns.
When starting the Docker image (or just runserver locally) this results in the following error:
File "/usr/local/lib/python2.7/dist-packages/drf_openapi/views.py", line 7, in <module>
from drf_openapi.entities import OpenApiSchemaGenerator
File "/usr/local/lib/python2.7/dist-packages/drf_openapi/entities.py", line 16, in <module>
from rest_framework.schemas.generators import insert_into, distribute_links, LinkNode
ImportError: No module named generators
If it makes any difference our DEFAULT_VERSIONING_CLASS is set to AcceptHeaderVersioning.
Apparently DRF 3.6.4 isn't supported anymore. I've upgraded to 3.7.7 and that starts the application but fails to render any pages. From the looks of it because AcceptHeaderVersioning is not playing along.
NoReverseMatch: Reverse for 'api_schema' with keyword arguments '{u'version': u'1.0.0'}' not found. 1 pattern(s) tried: ['docs/schema/$']
Description
I tried to add
drf_openapi
to an existing project.What I Did
I have added
drf-openapi==1.3.0
to myrequirements.txt
and installed it. I've added'drf_openapi',
toINSTALLED_APPS
andurl(r'^/docs/', include('drf_openapi.urls'))
to the urlpatterns.When starting the Docker image (or just runserver locally) this results in the following error:
If it makes any difference our
DEFAULT_VERSIONING_CLASS
is set toAcceptHeaderVersioning
.Obviously I'm missing something out in the open here. The default documentation in DRF does work for us.
The text was updated successfully, but these errors were encountered: