1
0
mirror of https://github.com/actix/examples synced 2024-11-23 14:31:07 +01: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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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.