I hope I can explain what is troubling me.
Example: I have an object basket with a list of product objects. So normally I would build my routes like this baskets/{basketId}/products/{productId). But product is an interface and there are different implementations like cds and books that all require their own resource representation.
So how do I build my routes now?
Like one of those?:
baskets/{basketId}/products/{productId)/cds,
baskets/{basketId}/products/{productId)/books
and so on
baskets/{basketId}/products/{productId)/cds/{productId} ,
baskets/{basketId}/products/{productId)/books/{productId}
baskets/{basketId}/cds/{productId},
baskets/{basketId}/books/{productId}
What would be the restful way?