fast_jsonapi
fast_jsonapi copied to clipboard
params option passed to serializer must be a hash
https://github.com/Netflix/fast_jsonapi/blob/master/lib/fast_jsonapi/object_serializer.rb#L86
Any reason why is this Hash only? I don't see any Hash specific methods running on params anywhere inside library itself. I'd like to pass params in a more OO way like:
Serializer.new(
resource,
params: SerializationContext.new(
params: params,
current_scope: current_scope,
alotofotherstuff: alotofotherstuff
)
)
I understand the only use of this params option is to pass user defined attributes through library. If I'm right then how do you feel about removing this primtive obsession antipattern requirement?