-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some descriptions to utoipa schema
- Loading branch information
Showing
3 changed files
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,10 @@ use uuid::Uuid; | |
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)] | ||
pub struct Recipient { | ||
#[serde(default = "Uuid::nil")] | ||
/// This ID will be used for List-Unsubscribe and other features. | ||
/// It is recommended to store it in an external system and use the same ID for the same Recipient. | ||
pub id: Uuid, | ||
#[schema(value_type = String)] | ||
#[schema(value_type = Vec<String>, examples("telegram:123456789", "mobile_phone:+123456789", "email:Anyone <[email protected]>"))] | ||
pub contacts: Vec<Contact>, | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters