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

rename_all = "camelCase" fails if fields are already in camelCase #194

Closed
NyxCode opened this issue Jan 20, 2024 · 1 comment · Fixed by #198
Closed

rename_all = "camelCase" fails if fields are already in camelCase #194

NyxCode opened this issue Jan 20, 2024 · 1 comment · Fixed by #198

Comments

@NyxCode
Copy link
Collaborator

NyxCode commented Jan 20, 2024

#[derive(Serialize, Deserialize, TS, Clone)]
#[serde(rename_all = "camelCase")]
pub struct CamelCase {
    alreadyCamelCase: u32
}

serde_json would serialize this into

{"alreadyCamelCase":0}

but we generate

interface CamelCase { alreadycamelcase: number, }
@escritorio-gustavo
Copy link
Contributor

This is due to a mistake I made in #184 this line should just be s.push(c)

I will submit a PR to fix it ASAP

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

Successfully merging a pull request may close this issue.

2 participants