From 57622f6ded4bce0250eb4eae7ebcdbd6b61fa33d Mon Sep 17 00:00:00 2001 From: dynco-nym <173912580+dynco-nym@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:37:28 +0100 Subject: [PATCH] Remove ErrorResponse --- common/nym_offline_compact_ecash/src/utils.rs | 12 ------------ nym-api/nym-api-requests/src/models.rs | 2 +- nym-api/src/node_status_api/models.rs | 8 ++++---- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/common/nym_offline_compact_ecash/src/utils.rs b/common/nym_offline_compact_ecash/src/utils.rs index 5aa759e3f96..57a648fff24 100644 --- a/common/nym_offline_compact_ecash/src/utils.rs +++ b/common/nym_offline_compact_ecash/src/utils.rs @@ -16,7 +16,6 @@ use group::{Curve, Group}; use itertools::Itertools; use std::borrow::Borrow; use std::ops::Neg; -use utoipa::ToSchema; pub struct Polynomial { coefficients: Vec, @@ -52,17 +51,6 @@ impl Polynomial { } } -#[derive(ToSchema)] -#[schema(title = "G2Projective")] -pub struct G2ProjectiveSchema { - #[schema(content_encoding = "base16")] - pub x: [u64; 6], - #[schema(content_encoding = "base16")] - pub y: [u64; 6], - #[schema(content_encoding = "base16")] - pub z: [u64; 6], -} - #[inline] pub fn generate_lagrangian_coefficients_at_origin(points: &[u64]) -> Vec { let x = Scalar::zero(); diff --git a/nym-api/nym-api-requests/src/models.rs b/nym-api/nym-api-requests/src/models.rs index d4225a58c5b..96473d9733d 100644 --- a/nym-api/nym-api-requests/src/models.rs +++ b/nym-api/nym-api-requests/src/models.rs @@ -41,7 +41,7 @@ use thiserror::Error; use time::{Date, OffsetDateTime}; use utoipa::{IntoParams, ToResponse, ToSchema}; -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema, ToSchema, ToResponse)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema)] pub struct RequestError { message: String, } diff --git a/nym-api/src/node_status_api/models.rs b/nym-api/src/node_status_api/models.rs index b88e8644b8e..2e33fd80253 100644 --- a/nym-api/src/node_status_api/models.rs +++ b/nym-api/src/node_status_api/models.rs @@ -22,7 +22,7 @@ use std::fmt::Display; use thiserror::Error; use time::{Date, OffsetDateTime}; use tracing::error; -use utoipa::{ToResponse, ToSchema}; +use utoipa::ToSchema; #[derive(Error, Debug)] #[error("Received uptime value was within 0-100 range (got {received})")] @@ -320,11 +320,11 @@ impl From for OldHistoricalUptimeResponse { // TODO rocket remove smurf name after eliminating `rocket` pub(crate) type AxumResult = Result; -#[derive(ToSchema, ToResponse)] -#[schema(title = "ErrorResponse")] +// #[derive(ToSchema, ToResponse)] +// #[schema(title = "ErrorResponse")] pub(crate) struct AxumErrorResponse { message: RequestError, - #[schema(value_type = u16)] + // #[schema(value_type = u16)] status: StatusCode, }