fix: exclude some unnecessary fields
This commit is contained in:
parent
0408dc8593
commit
b40775c165
1 changed files with 7 additions and 0 deletions
|
@ -37,6 +37,7 @@ pub struct Agent {
|
||||||
pub struct Property {
|
pub struct Property {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub value: String,
|
pub value: String,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub signature: Option<String>,
|
pub signature: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +84,9 @@ pub struct AuthenticateRequest {
|
||||||
pub agent: Agent,
|
pub agent: Agent,
|
||||||
pub username: String,
|
pub username: String,
|
||||||
pub password: String,
|
pub password: String,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub clientToken: Option<String>,
|
pub clientToken: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub requestUser: Option<bool>,
|
pub requestUser: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,6 +104,7 @@ pub struct RefreshRequest {
|
||||||
pub accessToken: String,
|
pub accessToken: String,
|
||||||
pub clientToken: String,
|
pub clientToken: String,
|
||||||
pub selectedProfile: Option<Profile>,
|
pub selectedProfile: Option<Profile>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub requestUser: Option<bool>,
|
pub requestUser: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,12 +113,14 @@ pub struct RefreshResponse {
|
||||||
pub accessToken: String,
|
pub accessToken: String,
|
||||||
pub clientToken: String,
|
pub clientToken: String,
|
||||||
pub selectedProfile: Profile,
|
pub selectedProfile: Profile,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub user: Option<User>,
|
pub user: Option<User>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug)]
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
pub struct ValidateRequest {
|
pub struct ValidateRequest {
|
||||||
pub accessToken: String,
|
pub accessToken: String,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub clientToken: Option<String>,
|
pub clientToken: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,6 +151,7 @@ pub struct AccessToken {
|
||||||
pub accessToken: String,
|
pub accessToken: String,
|
||||||
pub clientToken: String,
|
pub clientToken: String,
|
||||||
pub selectedProfile: Profile,
|
pub selectedProfile: Profile,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub availableProfiles: Option<Vec<Profile>>,
|
pub availableProfiles: Option<Vec<Profile>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue