At the same time, it remains unclear how to add documentation autogeneration with this versioning.
- Standard documentation does not connect at all. I tried to create different endpoints:
api/v1/docs and api/v2/docs.
Import:
from rest_framework.documentation import include_docs_urls
- And the old package
drf_yasg behaves incorrectly. For api version 2 displays api from version 1, substituting just api/v2. In this case, the error will not be visible, because endpoints are the same. But if endpoints from different versions will be named differently, they will be displayed in both versions.
Import:
from drf_yasg.views import get_schema_view
from drf_yasg import openapi
At the same time, it remains unclear how to add documentation autogeneration with this versioning.
api/v1/docsandapi/v2/docs.Import:
from rest_framework.documentation import include_docs_urlsdrf_yasgbehaves incorrectly. For api version 2 displays api from version 1, substituting justapi/v2. In this case, the error will not be visible, because endpoints are the same. But if endpoints from different versions will be named differently, they will be displayed in both versions.Import:
from drf_yasg.views import get_schema_viewfrom drf_yasg import openapi