-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Renamed property name is no longer used in the error report (0.17.0) #306
Comments
This has been removed for now since the support was very limited. It only worked with manual serde renaming, and not with container attributes (eg rename_all). Now that the derive has been rewritten it should be easier to implement it properly. |
I see! Yes, I noticed the lack of container attribute support. Do you plan to implement the feature in the near future? |
Yes but in practice I don't know when/if i will have the time for it. I'd definitely take a PR adding that though |
👍 I have no idea how complicated it would be to implement, but I'll gladly take a look at it. |
Hi @Keats! I finally have some time to start looking at this. I noticed the issue is still there in 0.18.1, even though the README still states that at least field level renames should work. I've had a more thorough look at the code now and think I have an idea how to go about implementing support for both container and field level serde renames. Just to make sure: you haven't started looking at this yet right? |
No i haven't. If it's in the README, it's something that should be removed |
In 0.16.1 the validation error report uses the renamed property name when using
#[serde(rename = "...")]
, but in 0.17.0 the original property name is used.In 0.16.1 the error report says
firstName: too short
, but in 0.17.0 it'sfirst_name: too short
. This is problematic since thefirstName
is what is actually expected to be sent from the client, notfirst_name
.The text was updated successfully, but these errors were encountered: