Skip to content

Commit

Permalink
fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Leshiy committed Sep 19, 2023
1 parent 0d133bc commit 9745836
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/cat-data-service/src/service/common/objects/voter_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,22 @@ pub(crate) struct VoterGroup {
/// The identifier of voting power token used withing this group.
/// All vote plans within a group are guaranteed to use the same token.
#[oai(skip_serializing_if_is_none = true)]
#[oai(validator(max_length = 121, min_length = 59, pattern = r"[0-9a-f]{56}\.[0-9a-f]{2,64}"))]
#[oai(validator(
max_length = 121,
min_length = 59,
pattern = r"[0-9a-f]{56}\.[0-9a-f]{2,64}"
))]
voting_token: Option<String>,
}

impl Example for VoterGroup {
fn example() -> Self {
Self {
group: Some(VoterGroupId::Direct),
voting_token: Some("134c2d0a0b5761445d3f2d08492a5c193e3a19194453511426153630.0418401957301613".to_string()),
voting_token: Some(
"134c2d0a0b5761445d3f2d08492a5c193e3a19194453511426153630.0418401957301613"
.to_string(),
),
}
}
}
Expand Down

0 comments on commit 9745836

Please sign in to comment.