Skip to content

PresentablePrimaryKeyRelatedField creates issue in redoc documentation. #180

@techlearner96

Description

@techlearner96

I have a serializer field which works differently for read and write. I used PresentablePrimaryKeyRelatedField for that.
e.g:
car_type = PresentablePrimaryKeyRelatedField(
queryset=CarType.objects.all(),
presentation_serializer=CarTypeSerializer,
read_source=None
)
This works well when accessing the api, like in request i give an integer value to car_type field and in response it gives a dictionary to car_type field. Api request-response thing worked well.
Issue is with swagger documentation. In documentation, it gives car_type as integer field in both request and response schema.
How can i deal with that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions