summaryrefslogtreecommitdiff
path: root/src/api/schema.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-06-29 22:27:19 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-06-29 22:27:19 +0300
commit25aeaa46f6c807be686b710c5c3aa656969f07e5 (patch)
tree8b9b4d4abce5951c2d87ee22c38eacb544eff81a /src/api/schema.rs
parent9150ed6268874d1f2a314b1ddbf531b66df1e105 (diff)
feat: generate socket protocol schema
Diffstat (limited to 'src/api/schema.rs')
-rw-r--r--src/api/schema.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/schema.rs b/src/api/schema.rs
index a404d56c..1a51dfbc 100644
--- a/src/api/schema.rs
+++ b/src/api/schema.rs
@@ -30,14 +30,14 @@ fn is_false(value: &bool) -> bool {
!*value
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
pub struct Request {
pub id: String,
#[serde(flatten)]
pub method: Method,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(tag = "method", content = "params")]
// Request enums are short-lived wire values; keeping variants direct preserves
// the simple serde shape and avoids boxing churn across every caller.