aboutsummaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api-spec
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
parent892b102d3c24cdde448d36c6ced35a75e368fe8c (diff)
downloadfatcat-6d9bab59919352bbdd5dd354c89c95d78a8f04a2.tar.gz
fatcat-6d9bab59919352bbdd5dd354c89c95d78a8f04a2.zip
rust impl last webcapture schema tweaks
Diffstat (limited to 'rust/fatcat-api-spec')
-rw-r--r--rust/fatcat-api-spec/README.md2
-rw-r--r--rust/fatcat-api-spec/api.yaml6
-rw-r--r--rust/fatcat-api-spec/api/swagger.yaml20
-rw-r--r--rust/fatcat-api-spec/src/models.rs9
4 files changed, 17 insertions, 20 deletions
diff --git a/rust/fatcat-api-spec/README.md b/rust/fatcat-api-spec/README.md
index bf7d63e6..babde90a 100644
--- a/rust/fatcat-api-spec/README.md
+++ b/rust/fatcat-api-spec/README.md
@@ -13,7 +13,7 @@ To see how to make this your own, look here:
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)
- API version: 0.1.0
-- Build date: 2018-12-26T23:15:13.714Z
+- Build date: 2018-12-27T06:46:04.412Z
This autogenerated project defines an API crate `fatcat` which contains:
* An `Api` trait defining the API in Rust.
diff --git a/rust/fatcat-api-spec/api.yaml b/rust/fatcat-api-spec/api.yaml
index 3eada7e4..eb0528d5 100644
--- a/rust/fatcat-api-spec/api.yaml
+++ b/rust/fatcat-api-spec/api.yaml
@@ -238,16 +238,14 @@ definitions:
- surt
- timestamp
- url
- - status_code
- sha1
properties:
surt:
type: string
example: "org,asheesh)/apus/ch1/node15.html"
timestamp:
- type: integer
- example: 20020429162520
- format: int64
+ type: string
+ example: "20020429162520"
url:
type: string
example: "http://www.asheesh.org:80/APUS/ch1/node15.html"
diff --git a/rust/fatcat-api-spec/api/swagger.yaml b/rust/fatcat-api-spec/api/swagger.yaml
index 4299efb4..908ff1ae 100644
--- a/rust/fatcat-api-spec/api/swagger.yaml
+++ b/rust/fatcat-api-spec/api/swagger.yaml
@@ -5928,14 +5928,14 @@ definitions:
sha256: "a77e4c11a57f1d757fca5754a8f83b5d4ece49a2d28596889127c1a2f3f28832"
mimetype: "text/html"
url: "http://www.asheesh.org:80/APUS/ch1/node15.html"
- timestamp: 20020429162520
+ timestamp: "20020429162520"
- sha1: "3f242a192acc258bdfdb151943419437f440c313"
surt: "org,asheesh)/apus/ch1/node15.html"
status_code: 200
sha256: "a77e4c11a57f1d757fca5754a8f83b5d4ece49a2d28596889127c1a2f3f28832"
mimetype: "text/html"
url: "http://www.asheesh.org:80/APUS/ch1/node15.html"
- timestamp: 20020429162520
+ timestamp: "20020429162520"
ident: "q3nouwy3nnbsvo3h5klxsx4a7y"
extra: "{}"
state: "wip"
@@ -6087,14 +6087,14 @@ definitions:
sha256: "a77e4c11a57f1d757fca5754a8f83b5d4ece49a2d28596889127c1a2f3f28832"
mimetype: "text/html"
url: "http://www.asheesh.org:80/APUS/ch1/node15.html"
- timestamp: 20020429162520
+ timestamp: "20020429162520"
- sha1: "3f242a192acc258bdfdb151943419437f440c313"
surt: "org,asheesh)/apus/ch1/node15.html"
status_code: 200
sha256: "a77e4c11a57f1d757fca5754a8f83b5d4ece49a2d28596889127c1a2f3f28832"
mimetype: "text/html"
url: "http://www.asheesh.org:80/APUS/ch1/node15.html"
- timestamp: 20020429162520
+ timestamp: "20020429162520"
ident: "q3nouwy3nnbsvo3h5klxsx4a7y"
extra: "{}"
state: "wip"
@@ -6118,14 +6118,14 @@ definitions:
sha256: "a77e4c11a57f1d757fca5754a8f83b5d4ece49a2d28596889127c1a2f3f28832"
mimetype: "text/html"
url: "http://www.asheesh.org:80/APUS/ch1/node15.html"
- timestamp: 20020429162520
+ timestamp: "20020429162520"
- sha1: "3f242a192acc258bdfdb151943419437f440c313"
surt: "org,asheesh)/apus/ch1/node15.html"
status_code: 200
sha256: "a77e4c11a57f1d757fca5754a8f83b5d4ece49a2d28596889127c1a2f3f28832"
mimetype: "text/html"
url: "http://www.asheesh.org:80/APUS/ch1/node15.html"
- timestamp: 20020429162520
+ timestamp: "20020429162520"
ident: "q3nouwy3nnbsvo3h5klxsx4a7y"
extra: "{}"
state: "wip"
@@ -7064,7 +7064,6 @@ definitions:
webcapture_entity_cdx:
required:
- "sha1"
- - "status_code"
- "surt"
- "timestamp"
- "url"
@@ -7073,9 +7072,8 @@ definitions:
type: "string"
example: "org,asheesh)/apus/ch1/node15.html"
timestamp:
- type: "integer"
- format: "int64"
- example: 20020429162520
+ type: "string"
+ example: "20020429162520"
url:
type: "string"
example: "http://www.asheesh.org:80/APUS/ch1/node15.html"
@@ -7099,7 +7097,7 @@ definitions:
sha256: "a77e4c11a57f1d757fca5754a8f83b5d4ece49a2d28596889127c1a2f3f28832"
mimetype: "text/html"
url: "http://www.asheesh.org:80/APUS/ch1/node15.html"
- timestamp: 20020429162520
+ timestamp: "20020429162520"
upperCaseName: "WEBCAPTURE_ENTITY_CDX"
release_entity_abstracts:
properties:
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,
}