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

chore: Serialize enums as CamelCase #2016

Closed
sunce86 opened this issue Oct 25, 2023 · 5 comments · Fixed by #2056
Closed

chore: Serialize enums as CamelCase #2016

sunce86 opened this issue Oct 25, 2023 · 5 comments · Fixed by #2056
Labels
good first issue Good for newcomers

Comments

@sunce86
Copy link
Contributor

sunce86 commented Oct 25, 2023

Background

I find lowercase for enums really hard to read if variant contains multiple words. If others agree, we should serialize them as CamelCase.

Remove all occurrences of #[serde(rename_all = "lowercase")].

@sunce86 sunce86 added the good first issue Good for newcomers label Oct 25, 2023
@devansh1401
Copy link
Contributor

Hey @sunce86, I would like to work on the issue.
Here is how I will proceed :
There are 11 occurrences of #[serde(rename_all = "lowercase")] , i will replace them with #[serde(rename_all = "camelCase")]
please let me know if it's alright and I could start working on it.

@sunce86
Copy link
Contributor Author

sunce86 commented Oct 26, 2023

@devansh1401 go for it! you might need to adjust a few driver tests along the way...

@devansh1401
Copy link
Contributor

I've made the necessary changes in my forked repository. You can find the changes in my forked repository here:
[ https://github.com/devansh1401/services ].
As you mentioned, I'd appreciate your guidance on locating and adjusting the driver tests.

@sunce86
Copy link
Contributor Author

sunce86 commented Oct 26, 2023

You should be able to create a PR from fork and see which driver tests are failing once CI is done.

@devansh1401
Copy link
Contributor

#2020
All of the tests are failing are line -209
could you help with it?

Screenshot 2023-10-26 at 6 11 56 PM

squadgazzz added a commit that referenced this issue Dec 13, 2023
# Description
Copied from the original PR:

> Replaced all occurrences of #[serde(rename_all = "lowercase")] with
`#[serde(rename_all = "camelCase")].
> Ensured that the changes maintain the readability and functionality of
the code.
> This pull request addresses the concern raised about enum variant
readability and serialisation. The changes improve the codebase's
consistency and enhance its clarity.
> Please review the changes, and I'm open to any feedback or adjustments
to ensure the code's quality and maintainability. Thank you for your
time and consideration.

## Related PRs
#2020

fixes: #2016

---------

Co-authored-by: Devansh Kukreja <[email protected]>
Co-authored-by: Devansh kukreja <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants