fix: exclude some unnecessary fields

This commit is contained in:
əlemi 2023-03-06 23:36:38 +01:00
parent 0408dc8593
commit b40775c165
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -37,6 +37,7 @@ pub struct Agent {
pub struct Property {
pub name: String,
pub value: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub signature: Option<String>,
}
@ -83,7 +84,9 @@ pub struct AuthenticateRequest {
pub agent: Agent,
pub username: String,
pub password: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub clientToken: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub requestUser: Option<bool>,
}
@ -101,6 +104,7 @@ pub struct RefreshRequest {
pub accessToken: String,
pub clientToken: String,
pub selectedProfile: Option<Profile>,
#[serde(skip_serializing_if = "Option::is_none")]
pub requestUser: Option<bool>,
}
@ -109,12 +113,14 @@ pub struct RefreshResponse {
pub accessToken: String,
pub clientToken: String,
pub selectedProfile: Profile,
#[serde(skip_serializing_if = "Option::is_none")]
pub user: Option<User>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ValidateRequest {
pub accessToken: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub clientToken: Option<String>,
}
@ -145,6 +151,7 @@ pub struct AccessToken {
pub accessToken: String,
pub clientToken: String,
pub selectedProfile: Profile,
#[serde(skip_serializing_if = "Option::is_none")]
pub availableProfiles: Option<Vec<Profile>>,
}