feat(subscriptions): add cmd to gen json schema

This commit introduces the 'notification-schema' command to generate a
JSON schema of the Notification struct which gets sent when notifying
subscribers of updates.
This commit is contained in:
LGUG2Z
2022-02-01 12:38:08 -08:00
parent cf5a41b5eb
commit 2db0d888c1
24 changed files with 149 additions and 28 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
use std::num::NonZeroUsize;
use clap::ArgEnum;
use schemars::JsonSchema;
use serde::Deserialize;
use serde::Serialize;
use strum::Display;
@@ -341,7 +342,7 @@ impl Arrangement for CustomLayout {
}
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, Display, EnumString, ArgEnum)]
#[derive(Clone, Copy, Debug, Serialize, Deserialize, Display, EnumString, ArgEnum, JsonSchema)]
#[strum(serialize_all = "snake_case")]
pub enum Axis {
Horizontal,