I had an issue when using django_injector with drf-yasg2: the schema was generated only for ViewSets skipping all my DRF's APIView subclasses. The Schema generator (the one, the is built in Django REST Framework) was expecting each DRF view to have .initkwargs property, but django_injector APIView wrapper (which is actually the replacement) was not setting this property.
I had an issue when using
django_injector
with drf-yasg2: the schema was generated only for ViewSets skipping all my DRF's APIView subclasses. The Schema generator (the one, the is built in Django REST Framework) was expecting each DRF view to have.initkwargs
property, butdjango_injector
APIView wrapper (which is actually the replacement) was not setting this property.Link to DRF source code where it sets the
.initkwargs
property: https://github.com/encode/django-rest-framework/blob/master/rest_framework/views.py#L140