aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fatcat-openapi2.yml1
-rw-r--r--rust/fatcat-api/README.md2
-rw-r--r--rust/fatcat-api/api.yaml1
-rw-r--r--rust/fatcat-api/api/swagger.yaml1
-rw-r--r--rust/fatcat-api/src/models.rs7
5 files changed, 5 insertions, 7 deletions
diff --git a/fatcat-openapi2.yml b/fatcat-openapi2.yml
index 2326f225..eba6b63c 100644
--- a/fatcat-openapi2.yml
+++ b/fatcat-openapi2.yml
@@ -129,7 +129,6 @@ definitions:
type: object
required:
- title
- - work_id
properties:
<<: *ENTITYPROPS
title:
diff --git a/rust/fatcat-api/README.md b/rust/fatcat-api/README.md
index 572bcbc5..fe725d7f 100644
--- a/rust/fatcat-api/README.md
+++ b/rust/fatcat-api/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-06-21T18:49:41.205Z
+- Build date: 2018-06-28T19:08:07.508Z
This autogenerated project defines an API crate `fatcat` which contains:
* An `Api` trait defining the API in Rust.
diff --git a/rust/fatcat-api/api.yaml b/rust/fatcat-api/api.yaml
index 2326f225..eba6b63c 100644
--- a/rust/fatcat-api/api.yaml
+++ b/rust/fatcat-api/api.yaml
@@ -129,7 +129,6 @@ definitions:
type: object
required:
- title
- - work_id
properties:
<<: *ENTITYPROPS
title:
diff --git a/rust/fatcat-api/api/swagger.yaml b/rust/fatcat-api/api/swagger.yaml
index 1a719322..8a328822 100644
--- a/rust/fatcat-api/api/swagger.yaml
+++ b/rust/fatcat-api/api/swagger.yaml
@@ -1710,7 +1710,6 @@ definitions:
type: "object"
required:
- "title"
- - "work_id"
properties:
refs:
type: "array"
diff --git a/rust/fatcat-api/src/models.rs b/rust/fatcat-api/src/models.rs
index fd9e8658..60330392 100644
--- a/rust/fatcat-api/src/models.rs
+++ b/rust/fatcat-api/src/models.rs
@@ -509,7 +509,8 @@ pub struct ReleaseEntity {
pub container_id: Option<String>,
#[serde(rename = "work_id")]
- pub work_id: String,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub work_id: Option<String>,
#[serde(rename = "title")]
pub title: String,
@@ -541,7 +542,7 @@ pub struct ReleaseEntity {
}
impl ReleaseEntity {
- pub fn new(work_id: String, title: String) -> ReleaseEntity {
+ pub fn new(title: String) -> ReleaseEntity {
ReleaseEntity {
refs: None,
contribs: None,
@@ -556,7 +557,7 @@ impl ReleaseEntity {
release_status: None,
release_type: None,
container_id: None,
- work_id: work_id,
+ work_id: None,
title: title,
state: None,
ident: None,