summaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api-spec/src/models.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-05-20 19:15:41 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-05-20 19:15:59 -0700
commitc06079af0949ac44472c9fdc2fc81766316cb88d (patch)
tree91eba894520e3aa3aff004230c97d7ea13d1a009 /rust/fatcat-api-spec/src/models.rs
parentdd9598577da8dfccaf0bb6daff56bab9d1d8e9a6 (diff)
downloadfatcat-c06079af0949ac44472c9fdc2fc81766316cb88d.tar.gz
fatcat-c06079af0949ac44472c9fdc2fc81766316cb88d.zip
schema: allow releases expansion on file/fileset/webcapture
And codegen rust and python
Diffstat (limited to 'rust/fatcat-api-spec/src/models.rs')
-rw-r--r--rust/fatcat-api-spec/src/models.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/rust/fatcat-api-spec/src/models.rs b/rust/fatcat-api-spec/src/models.rs
index 0ceed261..c8b68328 100644
--- a/rust/fatcat-api-spec/src/models.rs
+++ b/rust/fatcat-api-spec/src/models.rs
@@ -556,6 +556,11 @@ impl FileAutoBatch {
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FileEntity {
+ /// Optional; GET-only
+ #[serde(rename = "releases")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub releases: Option<Vec<models::ReleaseEntity>>,
+
#[serde(rename = "release_ids")]
#[serde(skip_serializing_if = "Option::is_none")]
pub release_ids: Option<Vec<String>>,
@@ -616,6 +621,7 @@ pub struct FileEntity {
impl FileEntity {
pub fn new() -> FileEntity {
FileEntity {
+ releases: None,
release_ids: None,
mimetype: None,
urls: None,
@@ -668,6 +674,11 @@ impl FilesetAutoBatch {
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FilesetEntity {
+ /// Optional; GET-only
+ #[serde(rename = "releases")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub releases: Option<Vec<models::ReleaseEntity>>,
+
#[serde(rename = "release_ids")]
#[serde(skip_serializing_if = "Option::is_none")]
pub release_ids: Option<Vec<String>>,
@@ -712,6 +723,7 @@ pub struct FilesetEntity {
impl FilesetEntity {
pub fn new() -> FilesetEntity {
FilesetEntity {
+ releases: None,
release_ids: None,
urls: None,
manifest: None,
@@ -1269,6 +1281,11 @@ impl WebcaptureCdxLine {
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebcaptureEntity {
+ /// Optional; GET-only
+ #[serde(rename = "releases")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub releases: Option<Vec<models::ReleaseEntity>>,
+
#[serde(rename = "release_ids")]
#[serde(skip_serializing_if = "Option::is_none")]
pub release_ids: Option<Vec<String>>,
@@ -1322,6 +1339,7 @@ pub struct WebcaptureEntity {
impl WebcaptureEntity {
pub fn new() -> WebcaptureEntity {
WebcaptureEntity {
+ releases: None,
release_ids: None,
timestamp: None,
original_url: None,