-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Description
AMS: 0.10.4
Expected behavior vs actual behavior
At work, one endpoint accepts an attribute called metadata
inside attributes
, a freeform hash that clients send us. We want it to be returned exactly as it was sent.
Currently
Given the attribute sent is data.attributes.metadata: {"order_id": 123}
,
then the response is data.attributes.metadata: {"order-id": 123}
(note the hyphen)
and it cannot be configured.
Expected:
Given the attribute sent is data.attributes.metadata: {"order_id": 123}
,
then the response should be data.attributes.metadata: {"order_id": 123}
when I configure AMS to ignore data.attributes.metadata
transformation.
Additonal helpful information
- I'm looking at CaseTransform gem and it's convoluted. For instance, https://github.com/rails-api/case_transform/blob/master/lib/case_transform.rb has the same operation duplicated over and over again. We'd have to refactor that a bit to make it work.
Metadata
Metadata
Assignees
Labels
No labels