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

feat: serde plugin support attributes #82

Merged
merged 2 commits into from
Feb 1, 2023
Merged

Conversation

Millione
Copy link
Member

Motivation

struct A {
    1: required string a(pilota.serde_attribute = "#[serde(rename = \"AA\")]"),
    2: required i32 b,
}(pilota.serde_attribute = "#[serde(rename_all = \"camelCase\")]")

Generated:

#[derive(
    :: serde :: Serialize,
    :: serde :: Deserialize,
)]
#[serde(rename_all = "camelCase")]
pub struct A {
    #[serde(rename = "AA")]
    pub a: ::pilota::FastStr,
    pub b: i32,
}

@Millione Millione requested review from a team as code owners January 17, 2023 07:55
PureWhiteWu
PureWhiteWu previously approved these changes Jan 17, 2023
@Millione Millione enabled auto-merge (squash) February 1, 2023 08:10
@Millione Millione merged commit 6da8b8e into cloudwego:main Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants