Почему django drf_yasg генерирует больше ненужной документации по API, чем предполагается?

Я создаю Swagger API запроса GET, но drf_yasg генерирует POST и GET запросы.

Вот мой settings.py

INSTALLED_APPS = [
    'django.contrib....',
    ...
    'drf_yasg',
    'business'
]

Вот мои API

#TODO: Get all
#URL: ('/CartItem/get-all', methods=['GET'])
class GetAll(generics.CreateAPIView):
    serializer_class = CartItemFilter
    @Logging
    def get(self, request):
        request_data = dict(zip(request.GET.keys(), request.GET.values()))
        serializer = self.serializer_class(data=request_data)
        serializer.is_valid(raise_exception=True)
        request_data["deleted_at__isnull"] = True
        cartItem = CartItem.objects.filter(**request_data).values()
        return Response.NewResponse(status.HTTP_200_OK, "Success", list(cartItem))

Здесь находится url-файл приложения

path('cart-item/get-all', CartItem.GetAll.as_view(), name="Get all cart item"),

Вот url файл в корневой папке

schema_view = get_schema_view(
   openapi.Info(
      title="6********",
      default_version='1.0',
      description="API *******"
   ),
   public=True,
   permission_classes=(permissions.AllowAny,),
)


urlpatterns = [
    path('admin/', admin.site.urls),
    path('documentation', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
    path('redoc/', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
    path('', include('business.urls')),
]

Я не вижу ничего плохого в моей настройке, но когда я включаю свой swagger, я вижу следующее

enter image description here

Путь cart-item/get-all содержит дополнительный POST-запрос. Создание моего swagger становится очень беспорядочным, так как есть много ненужных API

Вернуться на верх