aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-05-13 18:13:58 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-05-13 18:14:18 -0700
commit3085605aeed230ee003f4f406f5b76d6214db079 (patch)
tree8a2042a2a2b17039453f7058d02f2960238e0e42
parent06fe237d766ea6fd7046ddf5107afb353a1aad78 (diff)
downloadfatcat-3085605aeed230ee003f4f406f5b76d6214db079.tar.gz
fatcat-3085605aeed230ee003f4f406f5b76d6214db079.zip
codegen size_bytes -> size
-rw-r--r--python_client/fatcat_client/models/webcapture_entity_cdx.py30
-rw-r--r--rust/fatcat-api-spec/README.md2
-rw-r--r--rust/fatcat-api-spec/api.yaml4
-rw-r--r--rust/fatcat-api-spec/api/swagger.yaml18
-rw-r--r--rust/fatcat-api-spec/src/models.rs6
-rw-r--r--rust/tests/test_extid.rs3
6 files changed, 31 insertions, 32 deletions
diff --git a/python_client/fatcat_client/models/webcapture_entity_cdx.py b/python_client/fatcat_client/models/webcapture_entity_cdx.py
index 37ce0490..ea76134c 100644
--- a/python_client/fatcat_client/models/webcapture_entity_cdx.py
+++ b/python_client/fatcat_client/models/webcapture_entity_cdx.py
@@ -36,7 +36,7 @@ class WebcaptureEntityCdx(object):
'url': 'str',
'mimetype': 'str',
'status_code': 'int',
- 'size_bytes': 'int',
+ 'size': 'int',
'sha1': 'str',
'sha256': 'str'
}
@@ -47,12 +47,12 @@ class WebcaptureEntityCdx(object):
'url': 'url',
'mimetype': 'mimetype',
'status_code': 'status_code',
- 'size_bytes': 'size_bytes',
+ 'size': 'size',
'sha1': 'sha1',
'sha256': 'sha256'
}
- def __init__(self, surt=None, timestamp=None, url=None, mimetype=None, status_code=None, size_bytes=None, sha1=None, sha256=None): # noqa: E501
+ def __init__(self, surt=None, timestamp=None, url=None, mimetype=None, status_code=None, size=None, sha1=None, sha256=None): # noqa: E501
"""WebcaptureEntityCdx - a model defined in Swagger""" # noqa: E501
self._surt = None
@@ -60,7 +60,7 @@ class WebcaptureEntityCdx(object):
self._url = None
self._mimetype = None
self._status_code = None
- self._size_bytes = None
+ self._size = None
self._sha1 = None
self._sha256 = None
self.discriminator = None
@@ -72,8 +72,8 @@ class WebcaptureEntityCdx(object):
self.mimetype = mimetype
if status_code is not None:
self.status_code = status_code
- if size_bytes is not None:
- self.size_bytes = size_bytes
+ if size is not None:
+ self.size = size
self.sha1 = sha1
if sha256 is not None:
self.sha256 = sha256
@@ -192,25 +192,25 @@ class WebcaptureEntityCdx(object):
self._status_code = status_code
@property
- def size_bytes(self):
- """Gets the size_bytes of this WebcaptureEntityCdx. # noqa: E501
+ def size(self):
+ """Gets the size of this WebcaptureEntityCdx. # noqa: E501
- :return: The size_bytes of this WebcaptureEntityCdx. # noqa: E501
+ :return: The size of this WebcaptureEntityCdx. # noqa: E501
:rtype: int
"""
- return self._size_bytes
+ return self._size
- @size_bytes.setter
- def size_bytes(self, size_bytes):
- """Sets the size_bytes of this WebcaptureEntityCdx.
+ @size.setter
+ def size(self, size):
+ """Sets the size of this WebcaptureEntityCdx.
- :param size_bytes: The size_bytes of this WebcaptureEntityCdx. # noqa: E501
+ :param size: The size of this WebcaptureEntityCdx. # noqa: E501
:type: int
"""
- self._size_bytes = size_bytes
+ self._size = size
@property
def sha1(self):
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;