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] Paginator not added to polymorphic serializer #89

Closed janders4 closed 4 months ago

janders4 commented 4 months ago

Describe the bug*

Pagination links are not being added to the data document.

To Reproduce*

Use the polymorphic serialiser and pass in a Paginator as part of the options but do not include options.linkers.document

Expected behavior*

Pagination links should be included when provided

Screenshots

This is the logic that appears to be the problem. The paginator will only ever be added when options.linkers.document exists

Screenshot 2024-04-19 at 09 13 03

Platform*

janders4 commented 4 months ago

@jun-sheaf can you assign this to me please. I'll submit a PR for it