drf-yasg icon indicating copy to clipboard operation
drf-yasg copied to clipboard

Change responses typing

Open Nazareka opened this issue 3 years ago • 1 comments

Bug Report

Description

change typing

from:

:type responses: dict[int or str, (drf_yasg.openapi.Schema or drf_yasg.openapi.SchemaRef or
        drf_yasg.openapi.Response or str or rest_framework.serializers.Serializer)]

to

:type responses: dict[int or str, (drf_yasg.openapi.Schema or drf_yasg.openapi.SchemaRef or
        drf_yasg.openapi.Response or str or rest_framework.serializers.Serializer or type[rest_framework.serializers.Serializer])]

to include also classes of rest_framework.serializers.Serializer

Is this a regression?

Yes, the previous version in which this bug was not present was: ...

Minimal Reproduction


Stack trace / Error message


Your Environment


Nazareka avatar Jan 25 '22 11:01 Nazareka

Looks like a fairly easy fix there @nazareka - you could do this yourself and send a PR :-)

PaulWay avatar Feb 07 '22 03:02 PaulWay