Skip to content
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

[Feature Request] Rename all fields #261

Closed
AlJohri opened this issue Sep 6, 2016 · 3 comments
Closed

[Feature Request] Rename all fields #261

AlJohri opened this issue Sep 6, 2016 · 3 comments

Comments

@AlJohri
Copy link

AlJohri commented Sep 6, 2016

I was wondering if its possible to rename all fields based on a rule (method)? My use case is to be able to take camel case json input and automatically convert to PEP 8 style snake case. I can then run my validations on the data all written using snake case variable names.

@funkyfuture
Copy link
Member

funkyfuture commented Sep 6, 2016 via email

@funkyfuture
Copy link
Member

funkyfuture commented Sep 6, 2016

i'm not sure whether this is possible:

allow_unknown = {'rename_handler': camel_to_snail}
document = {'JavaSucks`: ...}
document = validator.normalized(document, {}, allow_unknown=allow_unknown)

if not, please report back.

@funkyfuture
Copy link
Member

this issue can be closed, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants