1
0
mirror of https://github.com/actix/examples synced 2025-06-26 17:17:42 +02:00

fix: added skip_serialization for JSON fields (#632)

Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
XT
2023-10-30 00:28:44 +01:00
committed by GitHub
parent 4bcc43fdab
commit c15a176b1c

View File

@ -109,6 +109,7 @@ pub struct Response {
// This member is REQUIRED on error.
// This member MUST NOT exist if there was no error triggered during invocation.
// The value for this member MUST be an Object as defined in section 5.1.
#[serde(skip_serializing_if = "Option::is_none")]
pub error: Option<ErrorData>,
/// This member is REQUIRED.