mathematic-inc / ts-japi

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

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

Closed egmacke closed 5 months ago

egmacke commented 5 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.