diff --git a/validation/api/src/types.rs b/validation/api/src/types.rs index 8c0cb32..4f9369b 100644 --- a/validation/api/src/types.rs +++ b/validation/api/src/types.rs @@ -74,9 +74,13 @@ pub struct GetScriptRequest{ pub struct GetScriptsRequest<'a>{ pub Page:u32, pub Limit:u32, + #[serde(skip_serializing_if="Option::is_none")] pub Name:Option<&'a str>, + #[serde(skip_serializing_if="Option::is_none")] pub Hash:Option<&'a str>, + #[serde(skip_serializing_if="Option::is_none")] pub Source:Option<&'a str>, + #[serde(skip_serializing_if="Option::is_none")] pub SubmissionID:Option, } pub struct HashRequest<'a>{ @@ -96,6 +100,7 @@ pub struct ScriptResponse{ pub struct CreateScriptRequest<'a>{ pub Name:&'a str, pub Source:&'a str, + #[serde(skip_serializing_if="Option::is_none")] pub SubmissionID:Option, } #[allow(nonstandard_style)] @@ -119,8 +124,11 @@ pub enum Policy{ pub struct GetScriptPoliciesRequest<'a>{ pub Page:u32, pub Limit:u32, + #[serde(skip_serializing_if="Option::is_none")] pub FromScriptHash:Option<&'a str>, + #[serde(skip_serializing_if="Option::is_none")] pub ToScriptID:Option, + #[serde(skip_serializing_if="Option::is_none")] pub Policy:Option, } #[allow(nonstandard_style)] @@ -148,8 +156,11 @@ pub struct ScriptPolicyIDResponse{ #[derive(serde::Serialize)] pub struct UpdateScriptPolicyRequest{ pub ScriptPolicyID:ScriptPolicyID, + #[serde(skip_serializing_if="Option::is_none")] pub FromScriptID:Option, + #[serde(skip_serializing_if="Option::is_none")] pub ToScriptID:Option, + #[serde(skip_serializing_if="Option::is_none")] pub Policy:Option, }