beam-community / jsonapi

JSON:API Serializer and Query Handler for Elixir
https://hex.pm/packages/jsonapi
MIT License
490 stars 79 forks source link

Bug: Relationship keys not transformed with `dasherize_shallow` config option #314

Closed protestContest closed 4 months ago

protestContest commented 4 months ago

If the :field_transformation config option is :dasherize or :camelize, the document's attributes and relationship keys are transformed. Since :dasherize_shallow and :camelize_shallow was introduced, only the keys of the document's attributes are transformed, but not the keys of relationships.

In my view, relationship keys should also be transformed when the :dasherize_shallow or :camelize_shallow options are used.

Related to #310. I'll create a PR for this small fix.