Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
radicle: fix build when schemars feature is not enabled
✗ CI failure Johannes Altmanninger committed 11 months ago
commit 059c80458897e5c678611e22ed34b9531faeeda8
parent 1a67ac18f36045fcdef1caf11204df93d60b4c1a
1 passed 1 failed (2 total) View logs
2 files changed +4 -4
modified radicle/src/node/config.rs
@@ -298,7 +298,7 @@ impl Default for RateLimits {
)]
pub struct ConnectAddress(
    #[serde(with = "crate::serde_ext::string")]
-
    #[schemars(
+
    #[cfg_attr(feature = "schemars", schemars(
        with = "String",
        regex(pattern = r"^.+@.+:((6553[0-5])|(655[0-2][0-9])|(65[0-4][0-9]{2})|(6[0-4][0-9]{3})|([1-5][0-9]{4})|([0-5]{0,5})|([0-9]{1,4}))$"),
        extend("examples" = [
@@ -307,7 +307,7 @@ pub struct ConnectAddress(
            "z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi@seed.example.com:8776",
            "z6MkkfM3tPXNPrPevKr3uSiQtHPuwnNhu2yUVjgd2jXVsVz5@192.0.2.0:31337",
        ]),
-
    )]
+
    ))]
    PeerAddr<NodeId, Address>,
);

modified radicle/src/web.rs
@@ -1,5 +1,4 @@
use crate::prelude::RepoId;
-
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use std::collections::HashSet;

@@ -30,8 +29,9 @@ pub struct Config {

/// Pinned content. This can be used to pin certain content when
/// listing, e.g. pin repositories on a web client.
-
#[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema)]
+
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
+
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct Pinned {
    /// Pinned repositories.
    pub repositories: HashSet<RepoId>,