summaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api-spec
diff options
context:
space:
mode:
Diffstat (limited to 'rust/fatcat-api-spec')
-rw-r--r--rust/fatcat-api-spec/README.md2
-rw-r--r--rust/fatcat-api-spec/api.yaml32
-rw-r--r--rust/fatcat-api-spec/api/swagger.yaml51
-rw-r--r--rust/fatcat-api-spec/src/models.rs56
4 files changed, 101 insertions, 40 deletions
diff --git a/rust/fatcat-api-spec/README.md b/rust/fatcat-api-spec/README.md
index 99522241..a55ad337 100644
--- a/rust/fatcat-api-spec/README.md
+++ b/rust/fatcat-api-spec/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: 2019-01-18T22:02:14.046Z
+- Build date: 2019-01-21T19:59:50.253Z
This autogenerated project defines an API crate `fatcat` which contains:
* An `Api` trait defining the API in Rust.
diff --git a/rust/fatcat-api-spec/api.yaml b/rust/fatcat-api-spec/api.yaml
index b35d918e..0a5391c8 100644
--- a/rust/fatcat-api-spec/api.yaml
+++ b/rust/fatcat-api-spec/api.yaml
@@ -26,6 +26,10 @@ tags: # TAGLINE
descriptions: "Creator entities: such as authors" # TAGLINE
- name: files # TAGLINE
descriptions: "File entities" # TAGLINE
+ - name: filesets # TAGLINE
+ descriptions: "Fileset entities" # TAGLINE
+ - name: webcaptures # TAGLINE
+ descriptions: "Webcapture entities" # TAGLINE
- name: releases # TAGLINE
descriptions: "Release entities: individual articles, pre-prints, books" # TAGLINE
- name: works # TAGLINE
@@ -132,6 +136,9 @@ definitions:
type: string
example: "Journal of Important Results"
description: "Required for valid entities"
+ container_type:
+ type: string
+ description: "Eg, 'journal'"
publisher:
type: string
example: "Society of Curious Students"
@@ -139,10 +146,6 @@ definitions:
<<: *FATCATISSN
wikidata_qid:
type: string
- abbrev:
- type: string
- coden:
- type: string
creator_entity:
type: object
# required for creation: display_name
@@ -316,7 +319,10 @@ definitions:
<<: *ENTITYPROPS
title:
type: string
- description: "Required for valid entities"
+ description: "Required for valid entities. The title used in citations and for display; usually English"
+ original_title:
+ type: string
+ description: "Title in original language (or, the language of the full text of this release)"
work_id:
type: string
example: "q3nouwy3nnbsvo3h5klxsx4a7y"
@@ -346,7 +352,7 @@ definitions:
example: "book"
release_status:
type: string
- example: "preprint"
+ example: "preprint, retracted"
release_date:
type: string
format: date
@@ -370,6 +376,10 @@ definitions:
core_id:
type: string
#format: custom
+ arxiv_id:
+ type: string
+ jstor_id:
+ type: string
volume:
type: string
issue:
@@ -382,6 +392,9 @@ definitions:
language:
description: "Two-letter RFC1766/ISO639-1 language code, with extensions"
type: string
+ license_slug:
+ type: string
+ description: "Short version of license name. Eg, 'CC-BY'"
contribs:
type: array
items:
@@ -591,11 +604,14 @@ definitions:
description: "Optional; GET-only"
raw_name:
type: string
+ role:
+ type: string
+ raw_affiliation:
+ type: string
+ description: "Raw affiliation string as displayed in text"
extra:
type: object
additionalProperties: {}
- role:
- type: string
auth_oidc:
type: object
required:
diff --git a/rust/fatcat-api-spec/api/swagger.yaml b/rust/fatcat-api-spec/api/swagger.yaml
index 98f34751..989ca0ab 100644
--- a/rust/fatcat-api-spec/api/swagger.yaml
+++ b/rust/fatcat-api-spec/api/swagger.yaml
@@ -11,6 +11,8 @@ tags:
- name: "containers"
- name: "creators"
- name: "files"
+- name: "filesets"
+- name: "webcaptures"
- name: "releases"
- name: "works"
- name: "edit-lifecycle"
@@ -7273,10 +7275,6 @@ definitions:
container_entity:
type: "object"
properties:
- coden:
- type: "string"
- abbrev:
- type: "string"
wikidata_qid:
type: "string"
issnl:
@@ -7288,6 +7286,9 @@ definitions:
publisher:
type: "string"
example: "Society of Curious Students"
+ container_type:
+ type: "string"
+ description: "Eg, 'journal'"
name:
type: "string"
example: "Journal of Important Results"
@@ -7326,13 +7327,12 @@ definitions:
- "deleted"
example:
redirect: "q3nouwy3nnbsvo3h5klxsx4a7y"
- coden: "coden"
ident: "q3nouwy3nnbsvo3h5klxsx4a7y"
extra: "{}"
+ container_type: "container_type"
name: "Journal of Important Results"
publisher: "Society of Curious Students"
issnl: "1234-5678"
- abbrev: "abbrev"
wikidata_qid: "wikidata_qid"
state: "wip"
edit_extra: "{}"
@@ -7687,6 +7687,9 @@ definitions:
type: "array"
items:
$ref: "#/definitions/release_contrib"
+ license_slug:
+ type: "string"
+ description: "Short version of license name. Eg, 'CC-BY'"
language:
type: "string"
description: "Two-letter RFC1766/ISO639-1 language code, with extensions"
@@ -7699,6 +7702,10 @@ definitions:
example: "12"
volume:
type: "string"
+ jstor_id:
+ type: "string"
+ arxiv_id:
+ type: "string"
core_id:
type: "string"
pmcid:
@@ -7721,7 +7728,7 @@ definitions:
format: "date"
release_status:
type: "string"
- example: "preprint"
+ example: "preprint, retracted"
release_type:
type: "string"
example: "book"
@@ -7749,9 +7756,14 @@ definitions:
work_id:
type: "string"
example: "q3nouwy3nnbsvo3h5klxsx4a7y"
+ original_title:
+ type: "string"
+ description: "Title in original language (or, the language of the full text\
+ \ of this release)"
title:
type: "string"
- description: "Required for valid entities"
+ description: "Required for valid entities. The title used in citations and\
+ \ for display; usually English"
state:
type: "string"
enum:
@@ -7787,13 +7799,12 @@ definitions:
example:
container:
redirect: "q3nouwy3nnbsvo3h5klxsx4a7y"
- coden: "coden"
ident: "q3nouwy3nnbsvo3h5klxsx4a7y"
extra: "{}"
+ container_type: "container_type"
name: "Journal of Important Results"
publisher: "Society of Curious Students"
issnl: "1234-5678"
- abbrev: "abbrev"
wikidata_qid: "wikidata_qid"
state: "wip"
edit_extra: "{}"
@@ -7865,7 +7876,8 @@ definitions:
language: "language"
title: "title"
contribs:
- - creator:
+ - raw_affiliation: "raw_affiliation"
+ creator:
redirect: "q3nouwy3nnbsvo3h5klxsx4a7y"
surname: "surname"
ident: "q3nouwy3nnbsvo3h5klxsx4a7y"
@@ -7882,7 +7894,8 @@ definitions:
extra: "{}"
creator_id: "creator_id"
index: 1
- - creator:
+ - raw_affiliation: "raw_affiliation"
+ creator:
redirect: "q3nouwy3nnbsvo3h5klxsx4a7y"
surname: "surname"
ident: "q3nouwy3nnbsvo3h5klxsx4a7y"
@@ -7904,9 +7917,11 @@ definitions:
extra: "{}"
state: "wip"
edit_extra: "{}"
+ jstor_id: "jstor_id"
redirect: "q3nouwy3nnbsvo3h5klxsx4a7y"
work_id: "q3nouwy3nnbsvo3h5klxsx4a7y"
issue: "12"
+ original_title: "original_title"
abstracts:
- sha1: "e9dd75237c94b209dc3ccd52722de6931a310ba3"
mimetype: "application/xml+jats"
@@ -7920,9 +7935,10 @@ definitions:
release_type: "book"
wikidata_qid: "wikidata_qid"
pmid: "pmid"
- release_status: "preprint"
+ release_status: "preprint, retracted"
revision: "86daea5b-1b6b-432a-bb67-ea97795f80fe"
volume: "volume"
+ license_slug: "license_slug"
refs:
- target_release_id: "q3nouwy3nnbsvo3h5klxsx4a7y"
container_name: "container_name"
@@ -7982,6 +7998,7 @@ definitions:
- "q3nouwy3nnbsvo3h5klxsx4a7y"
edit_extra: "{}"
md5: "1b39813549077b2347c0f370c3864b40"
+ arxiv_id: "arxiv_id"
filesets:
- redirect: "q3nouwy3nnbsvo3h5klxsx4a7y"
urls:
@@ -8932,11 +8949,15 @@ definitions:
$ref: "#/definitions/creator_entity"
raw_name:
type: "string"
- extra:
- type: "object"
role:
type: "string"
+ raw_affiliation:
+ type: "string"
+ description: "Raw affiliation string as displayed in text"
+ extra:
+ type: "object"
example:
+ raw_affiliation: "raw_affiliation"
creator:
redirect: "q3nouwy3nnbsvo3h5klxsx4a7y"
surname: "surname"
diff --git a/rust/fatcat-api-spec/src/models.rs b/rust/fatcat-api-spec/src/models.rs
index 1a34dd48..d6e6e07f 100644
--- a/rust/fatcat-api-spec/src/models.rs
+++ b/rust/fatcat-api-spec/src/models.rs
@@ -79,14 +79,6 @@ impl ChangelogEntry {
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ContainerEntity {
- #[serde(rename = "coden")]
- #[serde(skip_serializing_if = "Option::is_none")]
- pub coden: Option<String>,
-
- #[serde(rename = "abbrev")]
- #[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>,
@@ -99,6 +91,11 @@ pub struct ContainerEntity {
#[serde(skip_serializing_if = "Option::is_none")]
pub publisher: Option<String>,
+ /// Eg, 'journal'
+ #[serde(rename = "container_type")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub container_type: Option<String>,
+
/// Required for valid entities
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
@@ -136,11 +133,10 @@ pub struct ContainerEntity {
impl ContainerEntity {
pub fn new() -> ContainerEntity {
ContainerEntity {
- coden: None,
- abbrev: None,
wikidata_qid: None,
issnl: None,
publisher: None,
+ container_type: None,
name: None,
edit_extra: None,
extra: None,
@@ -709,13 +705,18 @@ pub struct ReleaseContrib {
#[serde(skip_serializing_if = "Option::is_none")]
pub raw_name: Option<String>,
- #[serde(rename = "extra")]
- #[serde(skip_serializing_if = "Option::is_none")]
- pub extra: Option<serde_json::Value>,
-
#[serde(rename = "role")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role: Option<String>,
+
+ /// Raw affiliation string as displayed in text
+ #[serde(rename = "raw_affiliation")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub raw_affiliation: Option<String>,
+
+ #[serde(rename = "extra")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub extra: Option<serde_json::Value>,
}
impl ReleaseContrib {
@@ -725,8 +726,9 @@ impl ReleaseContrib {
creator_id: None,
creator: None,
raw_name: None,
- extra: None,
role: None,
+ raw_affiliation: None,
+ extra: None,
}
}
}
@@ -745,6 +747,11 @@ pub struct ReleaseEntity {
#[serde(skip_serializing_if = "Option::is_none")]
pub contribs: Option<Vec<models::ReleaseContrib>>,
+ /// Short version of license name. Eg, 'CC-BY'
+ #[serde(rename = "license_slug")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub license_slug: Option<String>,
+
/// Two-letter RFC1766/ISO639-1 language code, with extensions
#[serde(rename = "language")]
#[serde(skip_serializing_if = "Option::is_none")]
@@ -766,6 +773,14 @@ pub struct ReleaseEntity {
#[serde(skip_serializing_if = "Option::is_none")]
pub volume: Option<String>,
+ #[serde(rename = "jstor_id")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub jstor_id: Option<String>,
+
+ #[serde(rename = "arxiv_id")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub arxiv_id: Option<String>,
+
#[serde(rename = "core_id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub core_id: Option<String>,
@@ -834,7 +849,12 @@ pub struct ReleaseEntity {
#[serde(skip_serializing_if = "Option::is_none")]
pub work_id: Option<String>,
- /// Required for valid entities
+ /// Title in original language (or, the language of the full text of this release)
+ #[serde(rename = "original_title")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub original_title: Option<String>,
+
+ /// Required for valid entities. The title used in citations and for display; usually English
#[serde(rename = "title")]
#[serde(skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
@@ -874,11 +894,14 @@ impl ReleaseEntity {
abstracts: None,
refs: None,
contribs: None,
+ license_slug: None,
language: None,
publisher: None,
pages: None,
issue: None,
volume: None,
+ jstor_id: None,
+ arxiv_id: None,
core_id: None,
pmcid: None,
pmid: None,
@@ -895,6 +918,7 @@ impl ReleaseEntity {
files: None,
container: None,
work_id: None,
+ original_title: None,
title: None,
state: None,
ident: None,