Closed egmacke closed 1 year ago
Sometime a relationship may be polymorpic. For example, the relationship of vehicle could be a Car or a Lorry.
vehicle
Car
Lorry
Currently there is no way to provide different relationship serializers based on the value of the relationship.
When defining the relator serializer, it would be good to be able to pass a collection of serializers with a discriminator field.
Is your feature request related to a problem? *
Sometime a relationship may be polymorpic. For example, the relationship of
vehicle
could be aCar
or aLorry
.Currently there is no way to provide different relationship serializers based on the value of the relationship.
Describe the solution you'd like*
When defining the relator serializer, it would be good to be able to pass a collection of serializers with a discriminator field.