jsonapi-serializable
jsonapi-serializable copied to clipboard
Conditional fields with key format
Hey, I've noticed that when you use first KeyFormat and then ConditionalFields, some conditions are ignored. This happens when formatted key differs from the original key and then its condition is not found in the conditions list.
Here I propose a solution to this problem: when registering condition block, I check if there is key formatting function and use it, if it was not already used. It's not very elegant but works :D