aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-07-25 12:17:34 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-07-25 12:17:34 -0700
commita4e45f77b5431e0211337afc67ee586c553590d3 (patch)
treedd82f9f3a515bc5a1b6431276ecf089e0c20a3f9
parent8630a99c0c6351f5d4a051ce0c38b162f46b62ae (diff)
downloadfatcat-a4e45f77b5431e0211337afc67ee586c553590d3.tar.gz
fatcat-a4e45f77b5431e0211337afc67ee586c553590d3.zip
actually add wikidata QIDs to the API
-rw-r--r--fatcat-openapi2.yml6
-rw-r--r--rust/fatcat-api/README.md2
-rw-r--r--rust/fatcat-api/api.yaml6
-rw-r--r--rust/fatcat-api/api/swagger.yaml45
-rw-r--r--rust/fatcat-api/src/models.rs15
5 files changed, 55 insertions, 19 deletions
diff --git a/fatcat-openapi2.yml b/fatcat-openapi2.yml
index 94acccb3..d3d0717b 100644
--- a/fatcat-openapi2.yml
+++ b/fatcat-openapi2.yml
@@ -72,6 +72,8 @@ definitions:
type: string
#format: custom
example: "1234-5678"
+ wikidata_qid:
+ type: string
abbrev:
type: string
coden:
@@ -93,6 +95,8 @@ definitions:
type: string
#format: custom
example: "0000-0002-1825-0097"
+ wikidata_qid:
+ type: string
file_entity:
type: object
properties:
@@ -170,6 +174,8 @@ definitions:
type: string
pmcid:
type: string
+ wikidata_qid:
+ type: string
volume:
type: string
issue:
diff --git a/rust/fatcat-api/README.md b/rust/fatcat-api/README.md
index f1fbb5cc..888462df 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-07-24T08:38:19.335Z
+- Build date: 2018-07-25T18:31:47.194Z
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 94acccb3..d3d0717b 100644
--- a/rust/fatcat-api/api.yaml
+++ b/rust/fatcat-api/api.yaml
@@ -72,6 +72,8 @@ definitions:
type: string
#format: custom
example: "1234-5678"
+ wikidata_qid:
+ type: string
abbrev:
type: string
coden:
@@ -93,6 +95,8 @@ definitions:
type: string
#format: custom
example: "0000-0002-1825-0097"
+ wikidata_qid:
+ type: string
file_entity:
type: object
properties:
@@ -170,6 +174,8 @@ definitions:
type: string
pmcid:
type: string
+ wikidata_qid:
+ type: string
volume:
type: string
issue:
diff --git a/rust/fatcat-api/api/swagger.yaml b/rust/fatcat-api/api/swagger.yaml
index 3a87109e..bb7361d8 100644
--- a/rust/fatcat-api/api/swagger.yaml
+++ b/rust/fatcat-api/api/swagger.yaml
@@ -1930,6 +1930,8 @@ definitions:
type: "string"
abbrev:
type: "string"
+ wikidata_qid:
+ type: "string"
issnl:
type: "string"
example: "1234-5678"
@@ -1970,6 +1972,7 @@ definitions:
editgroup_id: "q3nouwy3nnbsvo3h5klxsx4a7y"
issnl: "1234-5678"
abbrev: "abbrev"
+ wikidata_qid: "wikidata_qid"
state: "wip"
revision: "86daea5b-1b6b-432a-bb67-ea97795f80fe"
upperCaseName: "CONTAINER_ENTITY"
@@ -1978,6 +1981,8 @@ definitions:
required:
- "display_name"
properties:
+ wikidata_qid:
+ type: "string"
orcid:
type: "string"
example: "0000-0002-1825-0097"
@@ -2016,6 +2021,7 @@ definitions:
extra: "{}"
editgroup_id: "q3nouwy3nnbsvo3h5klxsx4a7y"
orcid: "0000-0002-1825-0097"
+ wikidata_qid: "wikidata_qid"
state: "wip"
given_name: "given_name"
display_name: "Grace Hopper"
@@ -2119,6 +2125,8 @@ definitions:
example: "12"
volume:
type: "string"
+ wikidata_qid:
+ type: "string"
pmcid:
type: "string"
pmid:
@@ -2167,6 +2175,24 @@ definitions:
extra:
type: "object"
example:
+ ident: "q3nouwy3nnbsvo3h5klxsx4a7y"
+ language: "language"
+ title: "title"
+ contribs:
+ - role: "role"
+ extra: "{}"
+ creator_id: "creator_id"
+ index: 1
+ raw: "raw"
+ - role: "role"
+ extra: "{}"
+ creator_id: "creator_id"
+ index: 1
+ raw: "raw"
+ pages: "pages"
+ extra: "{}"
+ editgroup_id: "q3nouwy3nnbsvo3h5klxsx4a7y"
+ state: "wip"
redirect: "q3nouwy3nnbsvo3h5klxsx4a7y"
work_id: "q3nouwy3nnbsvo3h5klxsx4a7y"
issue: "12"
@@ -2179,26 +2205,12 @@ definitions:
mimetype: "application/xml+jats"
lang: "en"
content: "<jats:p>Some abstract thing goes here</jats:p>"
- ident: "q3nouwy3nnbsvo3h5klxsx4a7y"
release_type: "book"
- language: "language"
+ wikidata_qid: "wikidata_qid"
pmid: "pmid"
- title: "title"
release_status: "preprint"
- contribs:
- - role: "role"
- extra: "{}"
- creator_id: "creator_id"
- index: 1
- raw: "raw"
- - role: "role"
- extra: "{}"
- creator_id: "creator_id"
- index: 1
- raw: "raw"
revision: "86daea5b-1b6b-432a-bb67-ea97795f80fe"
volume: "volume"
- pages: "pages"
refs:
- target_release_id: "target_release_id"
year: 6
@@ -2218,10 +2230,7 @@ definitions:
key: "key"
release_date: "2000-01-23"
isbn13: "isbn13"
- extra: "{}"
publisher: "publisher"
- editgroup_id: "q3nouwy3nnbsvo3h5klxsx4a7y"
- state: "wip"
pmcid: "pmcid"
container_id: "q3nouwy3nnbsvo3h5klxsx4a7y"
doi: "10.1234/abcde.789"
diff --git a/rust/fatcat-api/src/models.rs b/rust/fatcat-api/src/models.rs
index d798fe03..3ae9b1fa 100644
--- a/rust/fatcat-api/src/models.rs
+++ b/rust/fatcat-api/src/models.rs
@@ -46,6 +46,10 @@ pub struct ContainerEntity {
#[serde(skip_serializing_if = "Option::is_none")]
pub abbrev: Option<String>,
+ #[serde(rename = "wikidata_qid")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub wikidata_qid: Option<String>,
+
#[serde(rename = "issnl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub issnl: Option<String>,
@@ -88,6 +92,7 @@ impl ContainerEntity {
ContainerEntity {
coden: None,
abbrev: None,
+ wikidata_qid: None,
issnl: None,
publisher: None,
name: name,
@@ -103,6 +108,10 @@ impl ContainerEntity {
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CreatorEntity {
+ #[serde(rename = "wikidata_qid")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub wikidata_qid: Option<String>,
+
#[serde(rename = "orcid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub orcid: Option<String>,
@@ -147,6 +156,7 @@ pub struct CreatorEntity {
impl CreatorEntity {
pub fn new(display_name: String) -> CreatorEntity {
CreatorEntity {
+ wikidata_qid: None,
orcid: None,
surname: None,
given_name: None,
@@ -483,6 +493,10 @@ pub struct ReleaseEntity {
#[serde(skip_serializing_if = "Option::is_none")]
pub volume: Option<String>,
+ #[serde(rename = "wikidata_qid")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub wikidata_qid: Option<String>,
+
#[serde(rename = "pmcid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pmcid: Option<String>,
@@ -559,6 +573,7 @@ impl ReleaseEntity {
pages: None,
issue: None,
volume: None,
+ wikidata_qid: None,
pmcid: None,
pmid: None,
isbn13: None,