You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly, thank you for this library! Hopefully this will all make sense but essentially we're trying to use which-one-of and one-of with a snake-case field and we're getting actual: java.lang.IllegalArgumentException: Cannot check which one-of for :snakey_field. We're using the default :key-name-fn in our defmapper by not specifying anything.
If you take the example people.proto and alter the Address message to change the home field to be home_details:
The test will start failing with the above IllegalArgumentException as it's trying to look for :home-details in the proto-map rather than :home_details. one-of will also fail similarly if the field name inside the oneof is also snake-case.
I think the bug comes from this line and that should be using the :key-name-fn from the respective mapper in some way. It looks like this might be a bit more than minor surgery to solve this using my limited knowledge of the project so I thought I should at least report it to get some ideas on how best to solve it.
The text was updated successfully, but these errors were encountered:
Firstly, thank you for this library! Hopefully this will all make sense but essentially we're trying to use
which-one-of
andone-of
with a snake-case field and we're gettingactual: java.lang.IllegalArgumentException: Cannot check which one-of for :snakey_field
. We're using the default:key-name-fn
in ourdefmapper
by not specifying anything.If you take the example
people.proto
and alter theAddress
message to change thehome
field to behome_details
:And alter the
one-of-test
here to attempt to use the newhome_details
field:The test will start failing with the above
IllegalArgumentException
as it's trying to look for:home-details
in the proto-map rather than:home_details
.one-of
will also fail similarly if the field name inside theoneof
is also snake-case.I think the bug comes from this line and that should be using the
:key-name-fn
from the respective mapper in some way. It looks like this might be a bit more than minor surgery to solve this using my limited knowledge of the project so I thought I should at least report it to get some ideas on how best to solve it.The text was updated successfully, but these errors were encountered: