Skip to content

Commit

Permalink
fix: use internally tagged serde sttribute for IndexMetric enum
Browse files Browse the repository at this point in the history
  • Loading branch information
Batch21 committed Jan 20, 2025
1 parent 72f43ed commit a78c7f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pywr-schema/src/metric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ impl EdgeReference {
/// This struct is the integer equivalent of [`Metric`] and is used in places where an integer
/// value is required. See [`Metric`] for more information.
#[derive(serde::Deserialize, serde::Serialize, Debug, Clone, JsonSchema, Display, PartialEq)]
#[serde(untagged)]
#[serde(tag = "type")]
pub enum IndexMetric {
Constant {
value: u64,
Expand Down

0 comments on commit a78c7f1

Please sign in to comment.