Hi This is actually a question, I did a lot of searches and can't find the suggested way to use serializer as OpenApiParameter:
Currently I am using this way:
extend_schema(
operation_id="op1",
description="",
tags=["tag1"],
parameters=[MyQueryParamSerializer], <-
request=MyRequestBodySerializer,
responses={
status.HTTP_200_OK: OpenApiResponse()
}
)
This works for 0.16. But with the new version release three days ago (0.17).
It will start giving warnings starting tag 0.17.0 like:
error: List item 0 has incompatible type "Type[MyQueryParamSerializer]"; expected "OpenApiParameter"
So my question would be what's the preferred way to use Serializer(s) as OpenApiParameter(s)? Thanks for the answering and help!
Hi This is actually a question, I did a lot of searches and can't find the suggested way to use serializer as OpenApiParameter:
Currently I am using this way:
This works for 0.16. But with the new version release three days ago (0.17).
It will start giving warnings starting tag 0.17.0 like:
So my question would be what's the preferred way to use Serializer(s) as OpenApiParameter(s)? Thanks for the answering and help!