Skip to content

Commit

Permalink
chore: Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Rosa committed Nov 20, 2023
1 parent 9854748 commit 30f9f3a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions catalyst-gateway/bin/src/service/api/v1/fragments_post.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())))
}
2 changes: 2 additions & 0 deletions catalyst-gateway/bin/src/service/api/v1/fragments_statuses.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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())))
}
2 changes: 2 additions & 0 deletions catalyst-gateway/bin/src/service/common/objects/block.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Defines API schemas of block related types.
use poem_openapi::{types::Example, NewType, Object};

#[derive(NewType)]
Expand Down
Original file line number Diff line number Diff line change
@@ -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};
Expand Down Expand Up @@ -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,
}

Expand All @@ -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),
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Defines API schemas for fragment batch types.
use poem_openapi::{types::Example, NewType, Object};
use serde::Deserialize;

Expand Down
2 changes: 2 additions & 0 deletions catalyst-gateway/bin/src/service/common/objects/hash.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Defines API schemas for hash types.
use poem_openapi::{types::Example, Object};

#[derive(Object)]
Expand Down

0 comments on commit 30f9f3a

Please sign in to comment.