aboutsummaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api-spec/src
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-12-26 22:50:38 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-12-26 23:01:13 -0800
commit6d9bab59919352bbdd5dd354c89c95d78a8f04a2 (patch)
tree9bee5e9a33dbda2608c997620854ee2b7349a7e5 /rust/fatcat-api-spec/src
parent892b102d3c24cdde448d36c6ced35a75e368fe8c (diff)
downloadfatcat-6d9bab59919352bbdd5dd354c89c95d78a8f04a2.tar.gz
fatcat-6d9bab59919352bbdd5dd354c89c95d78a8f04a2.zip
rust impl last webcapture schema tweaks
Diffstat (limited to 'rust/fatcat-api-spec/src')
-rw-r--r--rust/fatcat-api-spec/src/models.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/rust/fatcat-api-spec/src/models.rs b/rust/fatcat-api-spec/src/models.rs
index c6fc3ae1..a7c1375f 100644
--- a/rust/fatcat-api-spec/src/models.rs
+++ b/rust/fatcat-api-spec/src/models.rs
@@ -943,7 +943,7 @@ pub struct WebcaptureEntityCdx {
pub surt: String,
#[serde(rename = "timestamp")]
- pub timestamp: i64,
+ pub timestamp: String,
#[serde(rename = "url")]
pub url: String,
@@ -953,7 +953,8 @@ pub struct WebcaptureEntityCdx {
pub mimetype: Option<String>,
#[serde(rename = "status_code")]
- pub status_code: i64,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub status_code: Option<i64>,
#[serde(rename = "sha1")]
pub sha1: String,
@@ -964,13 +965,13 @@ pub struct WebcaptureEntityCdx {
}
impl WebcaptureEntityCdx {
- pub fn new(surt: String, timestamp: i64, url: String, status_code: i64, sha1: String) -> WebcaptureEntityCdx {
+ pub fn new(surt: String, timestamp: String, url: String, sha1: String) -> WebcaptureEntityCdx {
WebcaptureEntityCdx {
surt: surt,
timestamp: timestamp,
url: url,
mimetype: None,
- status_code: status_code,
+ status_code: None,
sha1: sha1,
sha256: None,
}