Open ysangkok opened 8 months ago
propOptional
is probably more the missing thing, as recordPropOptionalWithCustomKeyName
also implies a missing recordPropWithCustomKeyName
, but that's kinda defeating the point of the record-related API, since using it guarantees the codec will roundtrip.
I think propOptional
should be easy enough to implement using recordProp
vs recordPropOptional
as a reference if you want to take a look at that.
If I use camelCase in my codebase, and an API uses snake_case, it seems like I have to use
prismaticCodec
and create converter functions that convert{field_name :: Foo}
to{fieldName :: Foo}
.Using the alternative
CA.prop
API, I can specify the key name, so there is no issue. But then I can't have left-out fields as there is no pendant torecordPropOptional
. Why is there norecordPropOptionalWithCustomKeyName
?