41fb17a31b
* WIP adding derive(ToSchema) * Derive ToSchema for more types * ContractBuildInformation on /nym_contracts_detailed * rustfmt * Add cfg_attr * A bunch of annotations * Compiles with utoipa 5.2 * WIP * Post rebase fixes * Gitattributes to ignore .sqlx diffs * generate Sqlx schema files * Improvements * Move ecash schema out of ecash crate * Move redocly config to nym-api/ * Move redocly config to nym-api/ * Remove ErrorResponse * Move generated openapi spec to .gitignore * Include BSL licence * Remove utoipa from ecash toml file * Remove placeholder annotations * Chain-watcher rebase changes * Update licence info * Treat Scalar as String in OpenAPI
24 lines
678 B
Rust
24 lines
678 B
Rust
// Copyright 2024 - Nym Technologies SA <contact@nymtech.net>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
use nym_mixnet_contract_common::NodeId;
|
|
use schemars::JsonSchema;
|
|
use serde::{Deserialize, Serialize};
|
|
use utoipa::{IntoParams, ToSchema};
|
|
|
|
#[derive(Serialize, Deserialize, Debug, JsonSchema, ToSchema, IntoParams)]
|
|
#[into_params(parameter_in = Query)]
|
|
pub struct PaginationRequest {
|
|
pub page: Option<u32>,
|
|
pub per_page: Option<u32>,
|
|
}
|
|
|
|
#[derive(Deserialize, IntoParams, ToSchema)]
|
|
#[schema(title = "NodeId")]
|
|
#[schema(as = NodeId)]
|
|
#[into_params(parameter_in = Path)]
|
|
pub(crate) struct NodeIdParam {
|
|
#[schema(value_type = u32)]
|
|
pub(crate) node_id: NodeId,
|
|
}
|