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 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>>,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue