From 6f54d75f644ab5f0120637b1ceb13b16a4c8534d Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 25 May 2018 18:59:02 -0700 Subject: fix date on release --- rust/fatcat-api/README.md | 2 +- rust/fatcat-api/api.yaml | 3 ++- rust/fatcat-api/api/swagger.yaml | 4 ++++ rust/fatcat-api/src/models.rs | 5 +++++ 4 files changed, 12 insertions(+), 2 deletions(-) (limited to 'rust/fatcat-api') diff --git a/rust/fatcat-api/README.md b/rust/fatcat-api/README.md index b67ad8f1..364f7271 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-26T00:48:55.047Z +- Build date: 2018-05-26T01:47:28.955Z 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 8dd4177f..cfce24d7 100644 --- a/rust/fatcat-api/api.yaml +++ b/rust/fatcat-api/api.yaml @@ -145,7 +145,8 @@ definitions: type: string example: "preprint" date: - type: date + type: string + format: date doi: type: string #format: custom diff --git a/rust/fatcat-api/api/swagger.yaml b/rust/fatcat-api/api/swagger.yaml index ce85d813..506cb9db 100644 --- a/rust/fatcat-api/api/swagger.yaml +++ b/rust/fatcat-api/api/swagger.yaml @@ -1191,6 +1191,9 @@ definitions: doi: type: "string" example: "10.1234/abcde.789" + date: + type: "string" + format: "date" release_type: type: "string" example: "preprint" @@ -1226,6 +1229,7 @@ definitions: extra: type: "object" example: + date: "2000-01-23" redirect: "f1f046a3-45c9-4b99-adce-000000000002" work_id: "f1f046a3-45c9-4b99-adce-000000000001" issue: "12" diff --git a/rust/fatcat-api/src/models.rs b/rust/fatcat-api/src/models.rs index 8d3abe7d..e3ce33c3 100644 --- a/rust/fatcat-api/src/models.rs +++ b/rust/fatcat-api/src/models.rs @@ -442,6 +442,10 @@ pub struct ReleaseEntity { #[serde(skip_serializing_if = "Option::is_none")] pub doi: Option, + #[serde(rename = "date")] + #[serde(skip_serializing_if = "Option::is_none")] + pub date: Option>, + #[serde(rename = "release_type")] #[serde(skip_serializing_if = "Option::is_none")] pub release_type: Option, @@ -491,6 +495,7 @@ impl ReleaseEntity { pages: None, volume: None, doi: None, + date: None, release_type: None, container_id: None, work_id: work_id, -- cgit v1.2.3