summaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-16 23:19:53 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-16 23:19:53 -0700
commit8b0fb02ed2c4368f1c3484757e0b94102144ffe5 (patch)
treed94ff028ee78294c321e5894007f57ff31b711f1 /rust/fatcat-api
parent52b428c3580a4d5d4e2533a3466b68917b08ef35 (diff)
downloadfatcat-8b0fb02ed2c4368f1c3484757e0b94102144ffe5.tar.gz
fatcat-8b0fb02ed2c4368f1c3484757e0b94102144ffe5.zip
minor tweaks to API spec
Diffstat (limited to 'rust/fatcat-api')
-rw-r--r--rust/fatcat-api/README.md2
-rw-r--r--rust/fatcat-api/api.yaml2
-rw-r--r--rust/fatcat-api/api/swagger.yaml1
-rw-r--r--rust/fatcat-api/src/models.rs7
4 files changed, 6 insertions, 6 deletions
diff --git a/rust/fatcat-api/README.md b/rust/fatcat-api/README.md
index f363f381..6247d176 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-05-17T05:00:05.471Z
+- Build date: 2018-05-17T06:11:30.535Z
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 9ec1f1fb..4f8f1b3d 100644
--- a/rust/fatcat-api/api.yaml
+++ b/rust/fatcat-api/api.yaml
@@ -95,7 +95,7 @@ definitions:
type: object
required:
- title
- - work
+ - work_id
properties:
<<: *ENTITYPROPS
title:
diff --git a/rust/fatcat-api/api/swagger.yaml b/rust/fatcat-api/api/swagger.yaml
index 009d0e08..3fa3fa02 100644
--- a/rust/fatcat-api/api/swagger.yaml
+++ b/rust/fatcat-api/api/swagger.yaml
@@ -1112,6 +1112,7 @@ definitions:
type: "object"
required:
- "title"
+ - "work_id"
properties:
issue:
type: "string"
diff --git a/rust/fatcat-api/src/models.rs b/rust/fatcat-api/src/models.rs
index 0186f0a0..24c7ad34 100644
--- a/rust/fatcat-api/src/models.rs
+++ b/rust/fatcat-api/src/models.rs
@@ -342,8 +342,7 @@ pub struct ReleaseEntity {
pub container_id: Option<String>,
#[serde(rename = "work_id")]
- #[serde(skip_serializing_if = "Option::is_none")]
- pub work_id: Option<String>,
+ pub work_id: String,
#[serde(rename = "title")]
pub title: String,
@@ -371,7 +370,7 @@ pub struct ReleaseEntity {
}
impl ReleaseEntity {
- pub fn new(title: String) -> ReleaseEntity {
+ pub fn new(work_id: String, title: String) -> ReleaseEntity {
ReleaseEntity {
issue: None,
pages: None,
@@ -379,7 +378,7 @@ impl ReleaseEntity {
doi: None,
release_type: None,
container_id: None,
- work_id: None,
+ work_id: work_id,
title: title,
state: None,
ident: None,