diff --git a/nym-api/nym-api-requests/src/models.rs b/nym-api/nym-api-requests/src/models.rs index 54781cf603..05cf9f702e 100644 --- a/nym-api/nym-api-requests/src/models.rs +++ b/nym-api/nym-api-requests/src/models.rs @@ -612,9 +612,15 @@ pub struct NymNodeDescription { // for now we only care about their ws/wss situation, nothing more pub mixnet_websockets: WebSockets, + #[serde(default = "default_node_role")] pub role: NodeRole, } +// For backwards compatibility, set a slightly artificial default +fn default_node_role() -> NodeRole { + NodeRole::Inactive +} + #[derive(Clone, Debug, Serialize, Deserialize, schemars::JsonSchema)] pub struct DescribedGateway { pub bond: GatewayBond,