1use serde::{Serialize, Deserialize};
2#[derive(Debug, Serialize, Deserialize)]
3pub struct Changelog {
4 #[serde(rename = "body")]
5 pub body: String,
7 #[serde(rename = "hidden")]
8 pub hidden: Option<bool>,
10 #[serde(rename = "title")]
11 pub title: String,
13 #[serde(rename = "type")]
14 pub type_: Option<String>,
15}
16impl std::fmt::Display for Changelog {
17 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
18 write!(f, "{}", serde_json::to_string(self).unwrap())
19 }
20}
21#[derive(Debug, Serialize, Deserialize)]
22pub struct CustomPage {
23 #[serde(rename = "body")]
24 pub body: Option<String>,
26 #[serde(rename = "hidden")]
27 pub hidden: Option<bool>,
29 #[serde(rename = "html")]
30 pub html: Option<String>,
32 #[serde(rename = "htmlmode")]
33 pub htmlmode: Option<bool>,
35 #[serde(rename = "title")]
36 pub title: String,
38}
39impl std::fmt::Display for CustomPage {
40 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
41 write!(f, "{}", serde_json::to_string(self).unwrap())
42 }
43}
44#[derive(Debug, Serialize, Deserialize)]
45pub struct Doc {
46 #[serde(rename = "body")]
47 pub body: Option<String>,
49 #[serde(rename = "category")]
50 pub category: String,
52 #[serde(rename = "hidden")]
53 pub hidden: Option<bool>,
55 #[serde(rename = "parentDoc")]
56 pub parent_doc: Option<String>,
58 #[serde(rename = "title")]
59 pub title: String,
61 #[serde(rename = "type")]
62 pub type_: Option<String>,
64}
65impl std::fmt::Display for Doc {
66 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
67 write!(f, "{}", serde_json::to_string(self).unwrap())
68 }
69}
70#[derive(Debug, Serialize, Deserialize)]
71pub struct Version {
72 #[serde(rename = "codename")]
73 pub codename: Option<String>,
75 #[serde(rename = "from")]
76 pub from: String,
78 #[serde(rename = "is_beta")]
79 pub is_beta: Option<bool>,
80 #[serde(rename = "is_deprecated")]
81 pub is_deprecated: Option<bool>,
83 #[serde(rename = "is_hidden")]
84 pub is_hidden: Option<bool>,
86 #[serde(rename = "is_stable")]
87 pub is_stable: Option<bool>,
89 #[serde(rename = "version")]
90 pub version: String,
92}
93impl std::fmt::Display for Version {
94 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
95 write!(f, "{}", serde_json::to_string(self).unwrap())
96 }
97}