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

[FR] Support relation specific include #52

Closed egmacke closed 1 year ago

egmacke commented 1 year ago

Is your feature request related to a problem? *

The JSON API spec states:

An endpoint MAY also support an include request parameter to allow the client to customize which related resources should be returned

The library currently only supports including all related resources to a specific depth using the depth parameter.

Describe the solution you'd like*

The ideal solution would be for the serializer options to accept an include parameter that defines which related resources should be added to the serialized document.