Skip to content

Commit

Permalink
Remove ErrorResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
dynco-nym committed Dec 19, 2024
1 parent 9120020 commit 57622f6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
12 changes: 0 additions & 12 deletions common/nym_offline_compact_ecash/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Scalar>,
Expand Down Expand Up @@ -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<Scalar> {
let x = Scalar::zero();
Expand Down
2 changes: 1 addition & 1 deletion nym-api/nym-api-requests/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
8 changes: 4 additions & 4 deletions nym-api/src/node_status_api/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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})")]
Expand Down Expand Up @@ -320,11 +320,11 @@ impl From<HistoricalUptime> for OldHistoricalUptimeResponse {
// TODO rocket remove smurf name after eliminating `rocket`
pub(crate) type AxumResult<T> = Result<T, AxumErrorResponse>;

#[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,
}

Expand Down

0 comments on commit 57622f6

Please sign in to comment.