diff options
Diffstat (limited to 'generator')
-rw-r--r-- | generator/src/structs.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/generator/src/structs.rs b/generator/src/structs.rs index 7daa8d4..6f2e917 100644 --- a/generator/src/structs.rs +++ b/generator/src/structs.rs @@ -134,6 +134,9 @@ pub fn create_enum( match variant { serde_json::Value::String(s) => { let variant_name = s.to_pascal_case(); + variants.push_str("#[serde(rename = \""); + variants.push_str(s); + variants.push_str("\")]"); variants.push_str(&variant_name); variants.push_str(",\n"); |