summaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api
diff options
context:
space:
mode:
Diffstat (limited to 'rust/fatcat-api')
-rw-r--r--rust/fatcat-api/README.md2
-rw-r--r--rust/fatcat-api/api.yaml50
-rw-r--r--rust/fatcat-api/api/swagger.yaml234
-rw-r--r--rust/fatcat-api/src/models.rs81
4 files changed, 249 insertions, 118 deletions
diff --git a/rust/fatcat-api/README.md b/rust/fatcat-api/README.md
index 856d54b5..57f877d2 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-28T21:40:16.318Z
+- Build date: 2018-06-04T07:14:27.260Z
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 8ced937d..c53ff4a7 100644
--- a/rust/fatcat-api/api.yaml
+++ b/rust/fatcat-api/api.yaml
@@ -22,7 +22,7 @@ x-entity-props: &ENTITYPROPS
ident:
type: string
#format: uuid
- example: "f1f046a3-45c9-4b99-adce-000000000001"
+ example: "00000000-0000-0000-adce-000000000001"
revision:
type: integer
example: 42
@@ -30,7 +30,7 @@ x-entity-props: &ENTITYPROPS
redirect:
type: string
#format: uuid
- example: "f1f046a3-45c9-4b99-adce-000000000002"
+ example: "00000000-0000-0000-adce-000000000002"
editgroup_id:
type: integer
example: 16
@@ -80,12 +80,16 @@ definitions:
creator_entity:
type: object
required:
- - full_name
+ - display_name
properties:
<<: *ENTITYPROPS
- full_name:
+ display_name:
type: string
example: "Grace Hopper"
+ given_name:
+ type: string
+ surname:
+ type: string
orcid:
type: string
#format: custom
@@ -106,10 +110,17 @@ definitions:
type: string
#format: custom
example: "d41efcc592d1e40ac13905377399eb9b"
+ sha256:
+ type: string
+ #format: custom
+ example: "a77e4c11a57f1d757fca5754a8f83b5d4ece49a2d28596889127c1a2f3f28832"
url:
type: string
format: url
example: "https://example.edu/~frau/prcding.pdf"
+ mimetype:
+ type: string
+ example: "application/pdf"
releases:
type: array
items:
@@ -126,14 +137,17 @@ definitions:
type: string
work_id:
type: string
- example: "f1f046a3-45c9-4b99-adce-000000000001"
+ example: "00000000-0000-0000-adce-000000000001"
container_id:
type: string
- example: "f1f046a3-45c9-4b99-adce-000000000001"
+ example: "00000000-0000-0000-adce-000000000001"
release_type:
type: string
+ example: "book"
+ release_status:
+ type: string
example: "preprint"
- date:
+ release_date:
type: string
format: date
doi:
@@ -152,6 +166,8 @@ definitions:
example: "12"
publisher:
type: string
+ language:
+ type: string
contribs:
type: array
items:
@@ -179,14 +195,14 @@ definitions:
format: int64
ident:
type: string
- example: "f1f046a3-45c9-4b99-adce-000000000001"
+ example: "00000000-0000-0000-adce-000000000001"
revision:
type: integer
example: 42
format: int64
redirect_ident:
type: string
- example: "f1f046a3-45c9-4b99-adce-000000000002"
+ example: "00000000-0000-0000-adce-000000000002"
#format: uuid
editgroup_id:
type: integer
@@ -269,8 +285,20 @@ definitions:
target_release_id:
type: string
#format: uuid
- stub:
+ raw:
+ type: string
+ key:
+ type: string
+ year:
+ type: integer
+ format: int64
+ container_title:
+ type: string
+ title:
+ type: string
+ locator:
type: string
+ example: "p123"
release_contrib:
type: object
properties:
@@ -280,7 +308,7 @@ definitions:
creator_id:
type: string
#format: uuid
- creator_stub:
+ raw:
type: string
role:
type: string
diff --git a/rust/fatcat-api/api/swagger.yaml b/rust/fatcat-api/api/swagger.yaml
index 0bb29bc6..2a847e1c 100644
--- a/rust/fatcat-api/api/swagger.yaml
+++ b/rust/fatcat-api/api/swagger.yaml
@@ -1365,14 +1365,14 @@ definitions:
example: 16
redirect:
type: "string"
- example: "f1f046a3-45c9-4b99-adce-000000000002"
+ example: "00000000-0000-0000-adce-000000000002"
revision:
type: "integer"
format: "int64"
example: 42
ident:
type: "string"
- example: "f1f046a3-45c9-4b99-adce-000000000001"
+ example: "00000000-0000-0000-adce-000000000001"
state:
type: "string"
enum:
@@ -1381,9 +1381,9 @@ definitions:
- "redirect"
- "deleted"
example:
- redirect: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect: "00000000-0000-0000-adce-000000000002"
coden: "coden"
- ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ ident: "00000000-0000-0000-adce-000000000001"
extra: "{}"
name: "Journal of Important Results"
publisher: "Society of Curious Students"
@@ -1396,12 +1396,16 @@ definitions:
creator_entity:
type: "object"
required:
- - "full_name"
+ - "display_name"
properties:
orcid:
type: "string"
example: "0000-0002-1825-0097"
- full_name:
+ surname:
+ type: "string"
+ given_name:
+ type: "string"
+ display_name:
type: "string"
example: "Grace Hopper"
state:
@@ -1413,14 +1417,14 @@ definitions:
- "deleted"
ident:
type: "string"
- example: "f1f046a3-45c9-4b99-adce-000000000001"
+ example: "00000000-0000-0000-adce-000000000001"
revision:
type: "integer"
format: "int64"
example: 42
redirect:
type: "string"
- example: "f1f046a3-45c9-4b99-adce-000000000002"
+ example: "00000000-0000-0000-adce-000000000002"
editgroup_id:
type: "integer"
format: "int64"
@@ -1428,13 +1432,15 @@ definitions:
extra:
type: "object"
example:
- redirect: "f1f046a3-45c9-4b99-adce-000000000002"
- full_name: "Grace Hopper"
- ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ redirect: "00000000-0000-0000-adce-000000000002"
+ surname: "surname"
+ ident: "00000000-0000-0000-adce-000000000001"
extra: "{}"
editgroup_id: 16
orcid: "0000-0002-1825-0097"
state: "wip"
+ given_name: "given_name"
+ display_name: "Grace Hopper"
revision: 42
upperCaseName: "CREATOR_ENTITY"
file_entity:
@@ -1444,10 +1450,16 @@ definitions:
type: "array"
items:
type: "string"
+ mimetype:
+ type: "string"
+ example: "application/pdf"
url:
type: "string"
format: "url"
example: "https://example.edu/~frau/prcding.pdf"
+ sha256:
+ type: "string"
+ example: "a77e4c11a57f1d757fca5754a8f83b5d4ece49a2d28596889127c1a2f3f28832"
md5:
type: "string"
example: "d41efcc592d1e40ac13905377399eb9b"
@@ -1466,14 +1478,14 @@ definitions:
example: 16
redirect:
type: "string"
- example: "f1f046a3-45c9-4b99-adce-000000000002"
+ example: "00000000-0000-0000-adce-000000000002"
revision:
type: "integer"
format: "int64"
example: 42
ident:
type: "string"
- example: "f1f046a3-45c9-4b99-adce-000000000001"
+ example: "00000000-0000-0000-adce-000000000001"
state:
type: "string"
enum:
@@ -1482,19 +1494,21 @@ definitions:
- "redirect"
- "deleted"
example:
+ redirect: "00000000-0000-0000-adce-000000000002"
+ sha256: "a77e4c11a57f1d757fca5754a8f83b5d4ece49a2d28596889127c1a2f3f28832"
+ ident: "00000000-0000-0000-adce-000000000001"
+ url: "https://example.edu/~frau/prcding.pdf"
+ releases:
+ - "releases"
+ - "releases"
+ revision: 42
sha1: "f013d66c7f6817d08b7eb2a93e6d0440c1f3e7f8"
- redirect: "f1f046a3-45c9-4b99-adce-000000000002"
size: 1048576
- ident: "f1f046a3-45c9-4b99-adce-000000000001"
extra: "{}"
editgroup_id: 16
+ mimetype: "application/pdf"
state: "wip"
- url: "https://example.edu/~frau/prcding.pdf"
- releases:
- - "releases"
- - "releases"
md5: "d41efcc592d1e40ac13905377399eb9b"
- revision: 42
upperCaseName: "FILE_ENTITY"
release_entity:
type: "object"
@@ -1510,6 +1524,8 @@ definitions:
type: "array"
items:
$ref: "#/definitions/release_contrib"
+ language:
+ type: "string"
publisher:
type: "string"
issue:
@@ -1524,18 +1540,21 @@ definitions:
doi:
type: "string"
example: "10.1234/abcde.789"
- date:
+ release_date:
type: "string"
format: "date"
- release_type:
+ release_status:
type: "string"
example: "preprint"
+ release_type:
+ type: "string"
+ example: "book"
container_id:
type: "string"
- example: "f1f046a3-45c9-4b99-adce-000000000001"
+ example: "00000000-0000-0000-adce-000000000001"
work_id:
type: "string"
- example: "f1f046a3-45c9-4b99-adce-000000000001"
+ example: "00000000-0000-0000-adce-000000000001"
title:
type: "string"
state:
@@ -1547,14 +1566,14 @@ definitions:
- "deleted"
ident:
type: "string"
- example: "f1f046a3-45c9-4b99-adce-000000000001"
+ example: "00000000-0000-0000-adce-000000000001"
revision:
type: "integer"
format: "int64"
example: 42
redirect:
type: "string"
- example: "f1f046a3-45c9-4b99-adce-000000000002"
+ example: "00000000-0000-0000-adce-000000000002"
editgroup_id:
type: "integer"
format: "int64"
@@ -1562,38 +1581,50 @@ definitions:
extra:
type: "object"
example:
- date: "2000-01-23"
- redirect: "f1f046a3-45c9-4b99-adce-000000000002"
- work_id: "f1f046a3-45c9-4b99-adce-000000000001"
+ redirect: "00000000-0000-0000-adce-000000000002"
+ work_id: "00000000-0000-0000-adce-000000000001"
issue: "12"
- ident: "f1f046a3-45c9-4b99-adce-000000000001"
- release_type: "preprint"
+ ident: "00000000-0000-0000-adce-000000000001"
+ release_type: "book"
+ language: "language"
title: "title"
+ release_status: "preprint"
contribs:
- role: "role"
- creator_stub: "creator_stub"
creator_id: "creator_id"
- index: 6
+ index: 1
+ raw: "raw"
- role: "role"
- creator_stub: "creator_stub"
creator_id: "creator_id"
- index: 6
+ index: 1
+ raw: "raw"
revision: 42
volume: "volume"
pages: "pages"
refs:
- target_release_id: "target_release_id"
- stub: "stub"
+ year: 6
+ container_title: "container_title"
index: 0
+ raw: "raw"
+ title: "title"
+ locator: "p123"
+ key: "key"
- target_release_id: "target_release_id"
- stub: "stub"
+ year: 6
+ container_title: "container_title"
index: 0
+ raw: "raw"
+ title: "title"
+ locator: "p123"
+ key: "key"
+ release_date: "2000-01-23"
isbn13: "isbn13"
extra: "{}"
publisher: "publisher"
editgroup_id: 16
state: "wip"
- container_id: "f1f046a3-45c9-4b99-adce-000000000001"
+ container_id: "00000000-0000-0000-adce-000000000001"
doi: "10.1234/abcde.789"
upperCaseName: "RELEASE_ENTITY"
work_entity:
@@ -1609,14 +1640,14 @@ definitions:
example: 16
redirect:
type: "string"
- example: "f1f046a3-45c9-4b99-adce-000000000002"
+ example: "00000000-0000-0000-adce-000000000002"
revision:
type: "integer"
format: "int64"
example: 42
ident:
type: "string"
- example: "f1f046a3-45c9-4b99-adce-000000000001"
+ example: "00000000-0000-0000-adce-000000000001"
state:
type: "string"
enum:
@@ -1625,8 +1656,8 @@ definitions:
- "redirect"
- "deleted"
example:
- redirect: "f1f046a3-45c9-4b99-adce-000000000002"
- ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ redirect: "00000000-0000-0000-adce-000000000002"
+ ident: "00000000-0000-0000-adce-000000000001"
extra: "{}"
work_type: "work_type"
editgroup_id: 16
@@ -1646,14 +1677,14 @@ definitions:
example: 847
ident:
type: "string"
- example: "f1f046a3-45c9-4b99-adce-000000000001"
+ example: "00000000-0000-0000-adce-000000000001"
revision:
type: "integer"
format: "int64"
example: 42
redirect_ident:
type: "string"
- example: "f1f046a3-45c9-4b99-adce-000000000002"
+ example: "00000000-0000-0000-adce-000000000002"
editgroup_id:
type: "integer"
format: "int64"
@@ -1661,10 +1692,10 @@ definitions:
extra:
type: "object"
example:
- ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
upperCaseName: "ENTITY_EDIT"
@@ -1700,68 +1731,68 @@ definitions:
extra: "{}"
edits:
works:
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
creators:
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
files:
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
containers:
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
releases:
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
description: "description"
@@ -1781,12 +1812,29 @@ definitions:
format: "int64"
target_release_id:
type: "string"
- stub:
+ raw:
+ type: "string"
+ key:
type: "string"
+ year:
+ type: "integer"
+ format: "int64"
+ container_title:
+ type: "string"
+ title:
+ type: "string"
+ locator:
+ type: "string"
+ example: "p123"
example:
target_release_id: "target_release_id"
- stub: "stub"
+ year: 6
+ container_title: "container_title"
index: 0
+ raw: "raw"
+ title: "title"
+ locator: "p123"
+ key: "key"
upperCaseName: "RELEASE_REF"
release_contrib:
type: "object"
@@ -1796,15 +1844,15 @@ definitions:
format: "int64"
creator_id:
type: "string"
- creator_stub:
+ raw:
type: "string"
role:
type: "string"
example:
role: "role"
- creator_stub: "creator_stub"
creator_id: "creator_id"
- index: 6
+ index: 1
+ raw: "raw"
upperCaseName: "RELEASE_CONTRIB"
editgroup_edits:
properties:
@@ -1830,68 +1878,68 @@ definitions:
$ref: "#/definitions/entity_edit"
example:
works:
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
creators:
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
files:
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
containers:
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
releases:
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
- - ident: "f1f046a3-45c9-4b99-adce-000000000001"
+ - ident: "00000000-0000-0000-adce-000000000001"
edit_id: 847
extra: "{}"
- redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002"
+ redirect_ident: "00000000-0000-0000-adce-000000000002"
editgroup_id: 16
revision: 42
upperCaseName: "EDITGROUP_EDITS"
@@ -1921,14 +1969,14 @@ x-entity-props:
- "deleted"
ident:
type: "string"
- example: "f1f046a3-45c9-4b99-adce-000000000001"
+ example: "00000000-0000-0000-adce-000000000001"
revision:
type: "integer"
example: 42
format: "int64"
redirect:
type: "string"
- example: "f1f046a3-45c9-4b99-adce-000000000002"
+ example: "00000000-0000-0000-adce-000000000002"
editgroup_id:
type: "integer"
example: 16
diff --git a/rust/fatcat-api/src/models.rs b/rust/fatcat-api/src/models.rs
index ab18e9b3..140e0c2e 100644
--- a/rust/fatcat-api/src/models.rs
+++ b/rust/fatcat-api/src/models.rs
@@ -163,8 +163,16 @@ pub struct CreatorEntity {
#[serde(skip_serializing_if = "Option::is_none")]
pub orcid: Option<String>,
- #[serde(rename = "full_name")]
- pub full_name: String,
+ #[serde(rename = "surname")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub surname: Option<String>,
+
+ #[serde(rename = "given_name")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub given_name: Option<String>,
+
+ #[serde(rename = "display_name")]
+ pub display_name: String,
// Note: inline enums are not fully supported by swagger-codegen
#[serde(rename = "state")]
@@ -193,10 +201,12 @@ pub struct CreatorEntity {
}
impl CreatorEntity {
- pub fn new(full_name: String) -> CreatorEntity {
+ pub fn new(display_name: String) -> CreatorEntity {
CreatorEntity {
orcid: None,
- full_name: full_name,
+ surname: None,
+ given_name: None,
+ display_name: display_name,
state: None,
ident: None,
revision: None,
@@ -343,10 +353,18 @@ pub struct FileEntity {
#[serde(skip_serializing_if = "Option::is_none")]
pub releases: Option<Vec<String>>,
+ #[serde(rename = "mimetype")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub mimetype: Option<String>,
+
#[serde(rename = "url")]
#[serde(skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
+ #[serde(rename = "sha256")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub sha256: Option<String>,
+
#[serde(rename = "md5")]
#[serde(skip_serializing_if = "Option::is_none")]
pub md5: Option<String>,
@@ -389,7 +407,9 @@ impl FileEntity {
pub fn new() -> FileEntity {
FileEntity {
releases: None,
+ mimetype: None,
url: None,
+ sha256: None,
md5: None,
sha1: None,
size: None,
@@ -413,9 +433,9 @@ pub struct ReleaseContrib {
#[serde(skip_serializing_if = "Option::is_none")]
pub creator_id: Option<String>,
- #[serde(rename = "creator_stub")]
+ #[serde(rename = "raw")]
#[serde(skip_serializing_if = "Option::is_none")]
- pub creator_stub: Option<String>,
+ pub raw: Option<String>,
#[serde(rename = "role")]
#[serde(skip_serializing_if = "Option::is_none")]
@@ -427,7 +447,7 @@ impl ReleaseContrib {
ReleaseContrib {
index: None,
creator_id: None,
- creator_stub: None,
+ raw: None,
role: None,
}
}
@@ -443,6 +463,10 @@ pub struct ReleaseEntity {
#[serde(skip_serializing_if = "Option::is_none")]
pub contribs: Option<Vec<models::ReleaseContrib>>,
+ #[serde(rename = "language")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub language: Option<String>,
+
#[serde(rename = "publisher")]
#[serde(skip_serializing_if = "Option::is_none")]
pub publisher: Option<String>,
@@ -467,9 +491,13 @@ pub struct ReleaseEntity {
#[serde(skip_serializing_if = "Option::is_none")]
pub doi: Option<String>,
- #[serde(rename = "date")]
+ #[serde(rename = "release_date")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub release_date: Option<chrono::DateTime<chrono::Utc>>,
+
+ #[serde(rename = "release_status")]
#[serde(skip_serializing_if = "Option::is_none")]
- pub date: Option<chrono::DateTime<chrono::Utc>>,
+ pub release_status: Option<String>,
#[serde(rename = "release_type")]
#[serde(skip_serializing_if = "Option::is_none")]
@@ -516,13 +544,15 @@ impl ReleaseEntity {
ReleaseEntity {
refs: None,
contribs: None,
+ language: None,
publisher: None,
issue: None,
pages: None,
volume: None,
isbn13: None,
doi: None,
- date: None,
+ release_date: None,
+ release_status: None,
release_type: None,
container_id: None,
work_id: work_id,
@@ -547,9 +577,29 @@ pub struct ReleaseRef {
#[serde(skip_serializing_if = "Option::is_none")]
pub target_release_id: Option<String>,
- #[serde(rename = "stub")]
+ #[serde(rename = "raw")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub raw: Option<String>,
+
+ #[serde(rename = "key")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub key: Option<String>,
+
+ #[serde(rename = "year")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub year: Option<i64>,
+
+ #[serde(rename = "container_title")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub container_title: Option<String>,
+
+ #[serde(rename = "title")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub title: Option<String>,
+
+ #[serde(rename = "locator")]
#[serde(skip_serializing_if = "Option::is_none")]
- pub stub: Option<String>,
+ pub locator: Option<String>,
}
impl ReleaseRef {
@@ -557,7 +607,12 @@ impl ReleaseRef {
ReleaseRef {
index: None,
target_release_id: None,
- stub: None,
+ raw: None,
+ key: None,
+ year: None,
+ container_title: None,
+ title: None,
+ locator: None,
}
}
}