When we write the entries for GET http://localhost:50231/Pets/SampleService.Model.BigPet , in JSON light minimal metadata mode, we emit type names for all BigPets. This is redundant as the type of the URI (BigPet) is the same as the type of entry being serialized. We should only emit type names if the entry being written is a derived type of BigPet.
This is happening as we compare the element type of the entity set (in this case, Pet) with the type of the entry being written (in this case, BigPet) and put the type name if they differ. Ideally, we should be checking the type of the uri and not the entity set.
The offending code is in ODataEntityTypeSerializer.cs , method - ShouldSuppressTypeNameSerialization.
This is happening as we compare the element type of the entity set (in this case, Pet) with the type of the entry being written (in this case, BigPet) and put the type name if they differ. Ideally, we should be checking the type of the uri and not the entity set.
The offending code is in ODataEntityTypeSerializer.cs , method - ShouldSuppressTypeNameSerialization.