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

43
Cargo.lock generated
View File

@@ -229,6 +229,12 @@ dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "dyn-clone"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf"
[[package]]
name = "either"
version = "1.6.1"
@@ -462,6 +468,7 @@ dependencies = [
"nanoid",
"parking_lot",
"paste",
"schemars",
"serde",
"serde_json",
"strum",
@@ -482,6 +489,7 @@ version = "0.1.8"
dependencies = [
"clap",
"color-eyre",
"schemars",
"serde",
"serde_json",
"serde_yaml",
@@ -1029,6 +1037,30 @@ dependencies = [
"winapi-util",
]
[[package]]
name = "schemars"
version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6b5a3c80cea1ab61f4260238409510e814e38b4b563c06044edf91e7dc070e3"
dependencies = [
"dyn-clone",
"schemars_derive",
"serde",
"serde_json",
]
[[package]]
name = "schemars_derive"
version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41ae4dce13e8614c46ac3c38ef1c0d668b101df6ac39817aebdaa26642ddae9b"
dependencies = [
"proc-macro2",
"quote",
"serde_derive_internals",
"syn",
]
[[package]]
name = "scopeguard"
version = "1.1.0"
@@ -1055,6 +1087,17 @@ dependencies = [
"syn",
]
[[package]]
name = "serde_derive_internals"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "serde_json"
version = "1.0.78"