diff --git a/nym-node/src/node/http/router/api/v1/metrics/wireguard.rs b/nym-node/src/node/http/router/api/v1/metrics/wireguard.rs index 3519ff30dd..1e4668a805 100644 --- a/nym-node/src/node/http/router/api/v1/metrics/wireguard.rs +++ b/nym-node/src/node/http/router/api/v1/metrics/wireguard.rs @@ -16,8 +16,8 @@ use nym_node_requests::api::v1::metrics::models::WireguardStats; tag = "Metrics", responses( (status = 200, content( - ("application/json" = WireguardStats), - ("application/yaml" = WireguardStats) + (WireguardStats = "application/json"), + (WireguardStats = "application/yaml") )) ), params(OutputParams), diff --git a/nyx-chain-watcher/src/db/models.rs b/nyx-chain-watcher/src/db/models.rs index 9a433ee8ec..ce99cedb89 100644 --- a/nyx-chain-watcher/src/db/models.rs +++ b/nyx-chain-watcher/src/db/models.rs @@ -1,7 +1,7 @@ use serde::{Deserialize, Serialize}; use utoipa::ToSchema; -#[derive(Clone, Deserialize, Debug)] +#[derive(Clone, Deserialize, Debug, ToSchema)] pub(crate) struct CurrencyPrices { pub(crate) chf: f32, pub(crate) usd: f32, diff --git a/nyx-chain-watcher/src/models.rs b/nyx-chain-watcher/src/models.rs index 93a9f9e592..ce1c0886f4 100644 --- a/nyx-chain-watcher/src/models.rs +++ b/nyx-chain-watcher/src/models.rs @@ -9,7 +9,18 @@ pub struct WebhookPayload { pub message_index: u64, pub sender_address: String, pub receiver_address: String, + #[schema(value_type = openapi_schema::Coin)] pub funds: CosmWasmCoin, pub height: u128, pub memo: Option, } + +pub mod openapi_schema { + use super::*; + + #[derive(ToSchema)] + pub struct Coin { + pub denom: String, + pub amount: String, + } +}