diff options
Diffstat (limited to 'rust')
| -rw-r--r-- | rust/fatcat-api-spec/README.md | 2 | ||||
| -rw-r--r-- | rust/fatcat-api-spec/api.yaml | 4 | ||||
| -rw-r--r-- | rust/fatcat-api-spec/api/swagger.yaml | 18 | ||||
| -rw-r--r-- | rust/fatcat-api-spec/src/models.rs | 6 | ||||
| -rw-r--r-- | rust/tests/test_extid.rs | 3 | 
5 files changed, 16 insertions, 17 deletions
| diff --git a/rust/fatcat-api-spec/README.md b/rust/fatcat-api-spec/README.md index fa2a6361..e597d8d1 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.2.0 -- Build date: 2019-05-10T21:23:45.364Z +- Build date: 2019-05-14T01:07:41.344Z  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 696d8495..02d4fda1 100644 --- a/rust/fatcat-api-spec/api.yaml +++ b/rust/fatcat-api-spec/api.yaml @@ -281,9 +281,9 @@ definitions:                type: integer                example: 200                format: int64 -            size_bytes: +            size:                type: integer -              example: 1235 +              example: 1048576                format: int64              sha1:                <<: *FATCATSHA1 diff --git a/rust/fatcat-api-spec/api/swagger.yaml b/rust/fatcat-api-spec/api/swagger.yaml index 6c8ce50b..4486470b 100644 --- a/rust/fatcat-api-spec/api/swagger.yaml +++ b/rust/fatcat-api-spec/api/swagger.yaml @@ -7792,7 +7792,7 @@ definitions:        - sha1: "e9dd75237c94b209dc3ccd52722de6931a310ba3"          surt: "org,asheesh)/apus/ch1/node15.html"          status_code: 200 -        size_bytes: 1235 +        size: 1048576          sha256: "cb1c378f464d5935ddaa8de28446d82638396c61f042295d7fb85e3cccc9e452"          mimetype: "text/html"          url: "http://www.asheesh.org:80/APUS/ch1/node15.html" @@ -7800,7 +7800,7 @@ definitions:        - sha1: "e9dd75237c94b209dc3ccd52722de6931a310ba3"          surt: "org,asheesh)/apus/ch1/node15.html"          status_code: 200 -        size_bytes: 1235 +        size: 1048576          sha256: "cb1c378f464d5935ddaa8de28446d82638396c61f042295d7fb85e3cccc9e452"          mimetype: "text/html"          url: "http://www.asheesh.org:80/APUS/ch1/node15.html" @@ -7968,7 +7968,7 @@ definitions:          - sha1: "e9dd75237c94b209dc3ccd52722de6931a310ba3"            surt: "org,asheesh)/apus/ch1/node15.html"            status_code: 200 -          size_bytes: 1235 +          size: 1048576            sha256: "cb1c378f464d5935ddaa8de28446d82638396c61f042295d7fb85e3cccc9e452"            mimetype: "text/html"            url: "http://www.asheesh.org:80/APUS/ch1/node15.html" @@ -7976,7 +7976,7 @@ definitions:          - sha1: "e9dd75237c94b209dc3ccd52722de6931a310ba3"            surt: "org,asheesh)/apus/ch1/node15.html"            status_code: 200 -          size_bytes: 1235 +          size: 1048576            sha256: "cb1c378f464d5935ddaa8de28446d82638396c61f042295d7fb85e3cccc9e452"            mimetype: "text/html"            url: "http://www.asheesh.org:80/APUS/ch1/node15.html" @@ -8001,7 +8001,7 @@ definitions:          - sha1: "e9dd75237c94b209dc3ccd52722de6931a310ba3"            surt: "org,asheesh)/apus/ch1/node15.html"            status_code: 200 -          size_bytes: 1235 +          size: 1048576            sha256: "cb1c378f464d5935ddaa8de28446d82638396c61f042295d7fb85e3cccc9e452"            mimetype: "text/html"            url: "http://www.asheesh.org:80/APUS/ch1/node15.html" @@ -8009,7 +8009,7 @@ definitions:          - sha1: "e9dd75237c94b209dc3ccd52722de6931a310ba3"            surt: "org,asheesh)/apus/ch1/node15.html"            status_code: 200 -          size_bytes: 1235 +          size: 1048576            sha256: "cb1c378f464d5935ddaa8de28446d82638396c61f042295d7fb85e3cccc9e452"            mimetype: "text/html"            url: "http://www.asheesh.org:80/APUS/ch1/node15.html" @@ -9284,10 +9284,10 @@ definitions:          type: "integer"          format: "int64"          example: 200 -      size_bytes: +      size:          type: "integer"          format: "int64" -        example: 1235 +        example: 1048576        sha1:          type: "string"          example: "e9dd75237c94b209dc3ccd52722de6931a310ba3" @@ -9304,7 +9304,7 @@ definitions:        sha1: "e9dd75237c94b209dc3ccd52722de6931a310ba3"        surt: "org,asheesh)/apus/ch1/node15.html"        status_code: 200 -      size_bytes: 1235 +      size: 1048576        sha256: "cb1c378f464d5935ddaa8de28446d82638396c61f042295d7fb85e3cccc9e452"        mimetype: "text/html"        url: "http://www.asheesh.org:80/APUS/ch1/node15.html" diff --git a/rust/fatcat-api-spec/src/models.rs b/rust/fatcat-api-spec/src/models.rs index 1d6b5088..ee0079f5 100644 --- a/rust/fatcat-api-spec/src/models.rs +++ b/rust/fatcat-api-spec/src/models.rs @@ -1197,9 +1197,9 @@ pub struct WebcaptureEntityCdx {      #[serde(skip_serializing_if = "Option::is_none")]      pub status_code: Option<i64>, -    #[serde(rename = "size_bytes")] +    #[serde(rename = "size")]      #[serde(skip_serializing_if = "Option::is_none")] -    pub size_bytes: Option<i64>, +    pub size: Option<i64>,      #[serde(rename = "sha1")]      pub sha1: String, @@ -1217,7 +1217,7 @@ impl WebcaptureEntityCdx {              url: url,              mimetype: None,              status_code: None, -            size_bytes: None, +            size: None,              sha1: sha1,              sha256: None,          } diff --git a/rust/tests/test_extid.rs b/rust/tests/test_extid.rs index f0dc11d1..f7386c28 100644 --- a/rust/tests/test_extid.rs +++ b/rust/tests/test_extid.rs @@ -1,9 +1,8 @@ - +use diesel::insert_into;  use diesel::prelude::*;  use fatcat::database_models::*;  use fatcat::database_schema::*;  use fatcat::server; -use diesel::insert_into;  use std::str::FromStr;  use uuid::Uuid; | 
