Skip to content

Commit

Permalink
fix: convert frontend responses to camel case (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
sighphyre authored Apr 25, 2024
1 parent 5645d74 commit 1717a61
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/frontend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ use utoipa::ToSchema;

#[derive(Serialize, Deserialize, Debug)]
#[cfg_attr(feature = "openapi", derive(ToSchema))]
#[serde(rename_all = "camelCase")]
pub struct FrontendResult {
pub toggles: Vec<EvaluatedToggle>,
}

#[derive(Clone, Serialize, Deserialize, Debug)]
#[cfg_attr(feature = "openapi", derive(ToSchema))]
#[serde(rename_all = "camelCase")]
pub struct EvaluatedToggle {
pub name: String,
pub enabled: bool,
Expand All @@ -21,6 +23,7 @@ pub struct EvaluatedToggle {

#[derive(Clone, Serialize, Deserialize, Debug)]
#[cfg_attr(feature = "openapi", derive(ToSchema))]
#[serde(rename_all = "camelCase")]
pub struct EvaluatedVariant {
pub name: String,
pub enabled: bool,
Expand Down

0 comments on commit 1717a61

Please sign in to comment.