PrimaryKeyRelatedField(read_only=True, pk_field=IntegerField()) have incorrect scheme #1335
Labels
bug
Something isn't working
fix confirmation pending
issue has been fixed and confirmation from issue reporter is pending
Describe the bug
I found a couple issues already solved related to this, but not found about pk_field. The problem is related to PrimaryKeyRelatedField(read_only=True). I try to add to this pk_field=IntegerField, but schema field=STR
To Reproduce
Expected behavior
Schema type taken from pk_field if pk_field defined
Place in code: https://github.com/tfranzel/drf-spectacular/blob/master/drf_spectacular/openapi.py#L712
The text was updated successfully, but these errors were encountered: