From 8b0fb02ed2c4368f1c3484757e0b94102144ffe5 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 16 May 2018 23:19:53 -0700 Subject: minor tweaks to API spec --- rust/fatcat-api/src/models.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'rust/fatcat-api/src/models.rs') diff --git a/rust/fatcat-api/src/models.rs b/rust/fatcat-api/src/models.rs index 0186f0a0..24c7ad34 100644 --- a/rust/fatcat-api/src/models.rs +++ b/rust/fatcat-api/src/models.rs @@ -342,8 +342,7 @@ pub struct ReleaseEntity { pub container_id: Option, #[serde(rename = "work_id")] - #[serde(skip_serializing_if = "Option::is_none")] - pub work_id: Option, + pub work_id: String, #[serde(rename = "title")] pub title: String, @@ -371,7 +370,7 @@ pub struct ReleaseEntity { } impl ReleaseEntity { - pub fn new(title: String) -> ReleaseEntity { + pub fn new(work_id: String, title: String) -> ReleaseEntity { ReleaseEntity { issue: None, pages: None, @@ -379,7 +378,7 @@ impl ReleaseEntity { doi: None, release_type: None, container_id: None, - work_id: None, + work_id: work_id, title: title, state: None, ident: None, -- cgit v1.2.3