From eee866e997981a44d1d97f0193f83926be89d1ad Mon Sep 17 00:00:00 2001 From: Apisit Ritreungroj Date: Fri, 8 Nov 2024 01:29:58 +0700 Subject: [PATCH] docs: partial lintfix --- .../bin/src/service/api/legacy/v0/proposals_post.rs | 3 +++ catalyst-gateway/bin/src/service/common/objects/legacy/fund.rs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/catalyst-gateway/bin/src/service/api/legacy/v0/proposals_post.rs b/catalyst-gateway/bin/src/service/api/legacy/v0/proposals_post.rs index e3e50d04f3..8942f2c28d 100644 --- a/catalyst-gateway/bin/src/service/api/legacy/v0/proposals_post.rs +++ b/catalyst-gateway/bin/src/service/api/legacy/v0/proposals_post.rs @@ -24,10 +24,13 @@ pub(crate) async fn endpoint(_message: Vec) -> AllRespon pub(crate) mod dto { use poem_openapi::Object; + /// An option item to specify proposal to query. #[allow(clippy::missing_docs_in_private_items)] #[derive(Object, Default)] pub(crate) struct VotingHistoryItem { + #[oai(validator(max_length = 256, min_length = 0, pattern = "[A-Za-z0-9_-]"))] vote_plan_id: String, + #[oai(validator(minimum(value = "0"), maximum(value = "4294967295")))] indexes: u32, } } diff --git a/catalyst-gateway/bin/src/service/common/objects/legacy/fund.rs b/catalyst-gateway/bin/src/service/common/objects/legacy/fund.rs index 83158c568a..33fb1d7d50 100644 --- a/catalyst-gateway/bin/src/service/common/objects/legacy/fund.rs +++ b/catalyst-gateway/bin/src/service/common/objects/legacy/fund.rs @@ -2,8 +2,10 @@ use poem_openapi::Object; +/// The fund object. #[allow(clippy::missing_docs_in_private_items)] #[derive(Object, Default)] pub(crate) struct Fund { + #[oai(validator(max_length = 256, min_length = 0, pattern = "[A-Za-z0-9_-]"))] id: String, }