Closed errietta closed 4 years ago
This seems to be a bug in DRF, fixed by encode/django-rest-framework@98c8af5291ac366b3030c4091284091ca63943ac. Can you check if you still see the same behaviour with the master version of DRF?
You're right @oxan that has been fixed in DRF master. I hope they will make a release soon, I'm not too big on using master 🙄 Thanks!
If you have something like:
If I use
get_schema_view
to generate an openapi schema, the result for a view usingCompanySerializer
is this:However, if I use
PeopleSerializer
directly, it generates a schema for all fields as expected. I'm not sure if this is a problem with DRF dataclass serializer or somewhere else, becauseget_fields()
on the serializer is definitely returning all fields as expected, and not sure how to debug this. Any ideas on why this is happening?