-
Notifications
You must be signed in to change notification settings - Fork 349
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
version 1.90.0 broke snakeToCamel=false functionality #423
Comments
@SchroederChris thanks for reporting. @ajaykarthikr or @SchroederChris , could either of you submit a PR for this? I think changing the So to the rest of the code generator, |
Ohhw, I think I got your general idea. But can you please clarify one thing? When there's |
Oh right, How about:
I think the ^ would actually restore But, if a user wanted, they could use snake keys (i.e. And then whenever Does that sound good? |
@stephenh I like that solution 👍 It allows for full flexibility and still keeps backwards compatibility. @ajaykarthikr thank you for taking care of this! You're probably more familiar with it than me atm. as you just changed it recently while for me it's been several months at least 😃 |
@stephenh Thanks for the detailed explanation. I add a PR soon. Can you guys give me a day or two to fix this? 😅 |
@ajaykarthikr sure, take your time 🙂 For me this is not urgent at all - the older versions currently work just fine for us. |
Changed `snakeToCamel: boolean` to `snakeToCamel: boolean | string`. So that `snakeToCamel` would look like `snakeToCamel: Array<"keys" | "json">`. So user can set true / false and then map those to true --> ["keys"] and false --> [] and then keys,json => ["keys", "json"] resolves stephenh#423
* fix: support mutliple options in snakeToCamel flag Changed `snakeToCamel: boolean` to `snakeToCamel: boolean | string`. So that `snakeToCamel` would look like `snakeToCamel: Array<"keys" | "json">`. So user can set true / false and then map those to true --> ["keys"] and false --> [] and then keys,json => ["keys", "json"] resolves #423 * docs: update ts_proto_opt usage in readme
🎉 This issue has been resolved in version 1.93.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@ajaykarthikr @stephenh thanks guys! |
Hey, as you already discussed in #408, that PR introduced breaking changes when using
snakeToCamel=false
.In our case, the json we're receiving contains snake_case properties, so all
fromJSON
methods accessing those properties are broken with the new version.I'd very much appreciate getting back the old behavior as you suggested with the
keys-and-json
option.The text was updated successfully, but these errors were encountered: