diff --git a/catalyst-gateway/bin/src/service/api/v1/fragments_post.rs b/catalyst-gateway/bin/src/service/api/v1/fragments_post.rs index cd44b22ebd4..d16b35aa9e8 100644 --- a/catalyst-gateway/bin/src/service/api/v1/fragments_post.rs +++ b/catalyst-gateway/bin/src/service/api/v1/fragments_post.rs @@ -30,6 +30,7 @@ pub(crate) type AllResponses = response! { /// * 500 Server Error - If anything within this function fails unexpectedly. (Possible /// but unlikely) /// * 503 Service Unavailable - Service is possibly not running reliably. +#[allow(clippy::unused_async)] pub(crate) async fn endpoint(_fragments_batch: FragmentsBatch) -> AllResponses { T200(OK(Json(FragmentsProcessingSummary::default()))) } diff --git a/catalyst-gateway/bin/src/service/api/v1/fragments_statuses.rs b/catalyst-gateway/bin/src/service/api/v1/fragments_statuses.rs index 00f0e1285b4..3ecfb42ba4a 100644 --- a/catalyst-gateway/bin/src/service/api/v1/fragments_statuses.rs +++ b/catalyst-gateway/bin/src/service/api/v1/fragments_statuses.rs @@ -13,6 +13,7 @@ use crate::service::common::{ }, }; +/// Comma-separated (no spaces in between) list of fragment IDs. #[derive(poem_openapi::NewType)] pub(crate) struct FragmentIds(String); @@ -33,6 +34,7 @@ pub(crate) type AllResponses = response! { /// * 500 Server Error - If anything within this function fails unexpectedly. (Possible /// but unlikely) /// * 503 Service Unavailable - Service is possibly not running reliably. +#[allow(clippy::unused_async)] pub(crate) async fn endpoint(_fragment_ids: FragmentIds) -> AllResponses { T200(OK(Json(HashMap::new()))) } diff --git a/catalyst-gateway/bin/src/service/common/objects/block.rs b/catalyst-gateway/bin/src/service/common/objects/block.rs index 516bb69359b..6ec83154e5a 100644 --- a/catalyst-gateway/bin/src/service/common/objects/block.rs +++ b/catalyst-gateway/bin/src/service/common/objects/block.rs @@ -1,3 +1,5 @@ +//! Defines API schemas of block related types. + use poem_openapi::{types::Example, NewType, Object}; #[derive(NewType)] diff --git a/catalyst-gateway/bin/src/service/common/objects/fragment_status.rs b/catalyst-gateway/bin/src/service/common/objects/fragment_status.rs index 8318b7b54bb..da051c82f4e 100644 --- a/catalyst-gateway/bin/src/service/common/objects/fragment_status.rs +++ b/catalyst-gateway/bin/src/service/common/objects/fragment_status.rs @@ -1,3 +1,5 @@ +//! Defines API schemas of fragment status types. + use poem_openapi::{types::Example, Object, Union}; use crate::service::common::objects::{block::BlockDate, hash::Hash}; @@ -27,7 +29,9 @@ impl Example for StatusRejected { #[oai(example = true)] /// Fragment is included in a block. pub(crate) struct StatusInABlock { + /// Block date at which the fragment was included in a block. pub date: BlockDate, + /// Hash of the block the fragment was included in. pub block: Hash, } @@ -44,7 +48,10 @@ impl Example for StatusInABlock { #[oai(one_of = true)] /// Possible fragment statuses. pub(crate) enum FragmentStatus { + /// Fragment is pending inclusion in a block. Pending(StatusPending), + /// Fragment was rejected. Rejected(StatusRejected), + /// Fragment was included in a block. InABlock(StatusInABlock), } diff --git a/catalyst-gateway/bin/src/service/common/objects/fragments_batch.rs b/catalyst-gateway/bin/src/service/common/objects/fragments_batch.rs index f4768199bf7..fc1457f11fd 100644 --- a/catalyst-gateway/bin/src/service/common/objects/fragments_batch.rs +++ b/catalyst-gateway/bin/src/service/common/objects/fragments_batch.rs @@ -1,3 +1,5 @@ +//! Defines API schemas for fragment batch types. + use poem_openapi::{types::Example, NewType, Object}; use serde::Deserialize; diff --git a/catalyst-gateway/bin/src/service/common/objects/hash.rs b/catalyst-gateway/bin/src/service/common/objects/hash.rs index ad2cf302fcd..55d99cf44d8 100644 --- a/catalyst-gateway/bin/src/service/common/objects/hash.rs +++ b/catalyst-gateway/bin/src/service/common/objects/hash.rs @@ -1,3 +1,5 @@ +//! Defines API schemas for hash types. + use poem_openapi::{types::Example, Object}; #[derive(Object)]