ts-japi icon indicating copy to clipboard operation
ts-japi copied to clipboard

looking for option to customize few things

Open sunnybogawat opened this issue 2 years ago • 1 comments

I am looking for some customization for the serialized response

  • How I can remove the JSON API version from the output?
  • Is it possible to exclude data in the Relator and only keep the links?
  • How I can exclude the include section from the serialized output

sunnybogawat avatar Oct 03 '22 10:10 sunnybogawat

Hi @sunnybogawat.

Most (if not all) of your customisations can be achieved using the SerializerOptions argument when invoking the serializer.

How I can remove the JSON API version from the output?

SerializerOption: version: null - Setting this to null will omit the version

Is it possible to exclude data in the Relator and only keep the links?

Could you give a fuller example of exactly what it is you want to achieve here?

How I can exclude the include section from the serialized output

If you mean the included section, then this should not be present unless you're explicitly requsting it using either the depth or include SerializerOption fields.

Hope that helps

egmacke avatar Nov 01 '22 10:11 egmacke