mathematic-inc / ts-japi

A highly-modular (typescript-friendly)-framework agnostic library for serializing data to the JSON:API specification
Apache License 2.0
205 stars 16 forks source link

[BUG] Polymorphic serialiser doesn't work standalone #80

Closed egmacke closed 7 months ago

egmacke commented 7 months ago

Describe the bug*

Using the polymorphic serializer for relationships works, but using it for top level resources does not. Instead it uses the first serializer in the array to serialize all resources.

Expected behavior*

Each resource should be serialized with the correct serializer.