submissions-api: openapi expects optional fields to be omitted
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
The default serde configuration is to serialize optional values as "null"
This commit is contained in:
parent
a511246d78
commit
ca846972c1
@ -74,9 +74,13 @@ pub struct GetScriptRequest{
|
|||||||
pub struct GetScriptsRequest<'a>{
|
pub struct GetScriptsRequest<'a>{
|
||||||
pub Page:u32,
|
pub Page:u32,
|
||||||
pub Limit:u32,
|
pub Limit:u32,
|
||||||
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub Name:Option<&'a str>,
|
pub Name:Option<&'a str>,
|
||||||
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub Hash:Option<&'a str>,
|
pub Hash:Option<&'a str>,
|
||||||
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub Source:Option<&'a str>,
|
pub Source:Option<&'a str>,
|
||||||
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub SubmissionID:Option<i64>,
|
pub SubmissionID:Option<i64>,
|
||||||
}
|
}
|
||||||
pub struct HashRequest<'a>{
|
pub struct HashRequest<'a>{
|
||||||
@ -96,6 +100,7 @@ pub struct ScriptResponse{
|
|||||||
pub struct CreateScriptRequest<'a>{
|
pub struct CreateScriptRequest<'a>{
|
||||||
pub Name:&'a str,
|
pub Name:&'a str,
|
||||||
pub Source:&'a str,
|
pub Source:&'a str,
|
||||||
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub SubmissionID:Option<i64>,
|
pub SubmissionID:Option<i64>,
|
||||||
}
|
}
|
||||||
#[allow(nonstandard_style)]
|
#[allow(nonstandard_style)]
|
||||||
@ -119,8 +124,11 @@ pub enum Policy{
|
|||||||
pub struct GetScriptPoliciesRequest<'a>{
|
pub struct GetScriptPoliciesRequest<'a>{
|
||||||
pub Page:u32,
|
pub Page:u32,
|
||||||
pub Limit:u32,
|
pub Limit:u32,
|
||||||
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub FromScriptHash:Option<&'a str>,
|
pub FromScriptHash:Option<&'a str>,
|
||||||
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub ToScriptID:Option<ScriptID>,
|
pub ToScriptID:Option<ScriptID>,
|
||||||
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub Policy:Option<Policy>,
|
pub Policy:Option<Policy>,
|
||||||
}
|
}
|
||||||
#[allow(nonstandard_style)]
|
#[allow(nonstandard_style)]
|
||||||
@ -148,8 +156,11 @@ pub struct ScriptPolicyIDResponse{
|
|||||||
#[derive(serde::Serialize)]
|
#[derive(serde::Serialize)]
|
||||||
pub struct UpdateScriptPolicyRequest{
|
pub struct UpdateScriptPolicyRequest{
|
||||||
pub ScriptPolicyID:ScriptPolicyID,
|
pub ScriptPolicyID:ScriptPolicyID,
|
||||||
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub FromScriptID:Option<ScriptID>,
|
pub FromScriptID:Option<ScriptID>,
|
||||||
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub ToScriptID:Option<ScriptID>,
|
pub ToScriptID:Option<ScriptID>,
|
||||||
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub Policy:Option<Policy>,
|
pub Policy:Option<Policy>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user