Closed Rfank2021 closed 1 year ago
If there are multiple nested different data classes in one data class, the swagger doc will only contain one nested data class type.
We can solve the problem by specifying the nested data class serializer manually. The annotation is here, https://drf-yasg.readthedocs.io/en/stable/custom_spec.html#the-swagger-auto-schema-decorator
Do you have any idea if and/or how this could be fixed in djangorestframework-dataclasses? It smells a lot like either a bug in or a bad interaction with drf-yasg (which I've never used).
If there are multiple nested different data classes in one data class, the swagger doc will only contain one nested data class type.
We can solve the problem by specifying the nested data class serializer manually. The annotation is here, https://drf-yasg.readthedocs.io/en/stable/custom_spec.html#the-swagger-auto-schema-decorator