diff --git a/crates/form/src/forms/custom.rs b/crates/form/src/forms/custom.rs index 9859931..b2653a8 100644 --- a/crates/form/src/forms/custom.rs +++ b/crates/form/src/forms/custom.rs @@ -7,7 +7,9 @@ use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[serde(deny_unknown_fields)] pub struct CustomForm { + /// Refers to the title. pub title: String, + /// All elements in the [`CustomForm`](CustomForm). Sequence is maintained. #[serde(rename = "content")] pub elements: Vec, } diff --git a/crates/form/src/forms/modal.rs b/crates/form/src/forms/modal.rs index c995449..cc42d71 100644 --- a/crates/form/src/forms/modal.rs +++ b/crates/form/src/forms/modal.rs @@ -9,9 +9,13 @@ use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[serde(deny_unknown_fields)] pub struct ModalForm { + /// Refers to the title. pub title: String, + /// Refers to the body. #[serde(rename = "content")] pub body: String, + /// Refers to the first displayed button. pub button1: Button, + /// Refers to the second displayed button. pub button2: Button, } diff --git a/crates/form/src/forms/simple.rs b/crates/form/src/forms/simple.rs index 5f0b269..2156633 100644 --- a/crates/form/src/forms/simple.rs +++ b/crates/form/src/forms/simple.rs @@ -7,8 +7,11 @@ use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[serde(deny_unknown_fields)] pub struct SimpleForm { + /// Refers to the title. pub title: String, + /// Refers to the body. #[serde(rename = "content")] pub body: String, + /// Refers to all available buttons. Sequence is maintained. pub buttons: Vec