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

View File

@@ -7,6 +7,7 @@ use getset::CopyGetters;
use getset::Getters;
use getset::MutGetters;
use getset::Setters;
use schemars::JsonSchema;
use serde::Serialize;
use komorebi_core::Rect;
@@ -15,7 +16,7 @@ use crate::container::Container;
use crate::ring::Ring;
use crate::workspace::Workspace;
#[derive(Debug, Clone, Serialize, Getters, CopyGetters, MutGetters, Setters)]
#[derive(Debug, Clone, Serialize, Getters, CopyGetters, MutGetters, Setters, JsonSchema)]
pub struct Monitor {
#[getset(get_copy = "pub", set = "pub")]
id: isize,