diff options
author | Bryan Newbold <bnewbold@archive.org> | 2021-02-02 11:42:43 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2021-02-02 11:42:43 -0800 |
commit | b8991aed0f4c9f58daad1865a3873fc31bdc96bd (patch) | |
tree | 9b1a669f192fdddc419ac06a6632a46e690a5cc8 /rust/fatcat-openapi/src/models.rs | |
parent | 119835ea0cf68f0003299cb3e285ae7d8d744af4 (diff) | |
download | fatcat-cli-b8991aed0f4c9f58daad1865a3873fc31bdc96bd.tar.gz fatcat-cli-b8991aed0f4c9f58daad1865a3873fc31bdc96bd.zip |
re-codegen openapi stuff
Diffstat (limited to 'rust/fatcat-openapi/src/models.rs')
-rw-r--r-- | rust/fatcat-openapi/src/models.rs | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/rust/fatcat-openapi/src/models.rs b/rust/fatcat-openapi/src/models.rs index b0a802c..d642c62 100644 --- a/rust/fatcat-openapi/src/models.rs +++ b/rust/fatcat-openapi/src/models.rs @@ -5779,6 +5779,21 @@ pub struct ReleaseExtIds { #[serde(rename = "mag")] #[serde(skip_serializing_if = "Option::is_none")] pub mag: Option<String>, + + /// DOAJ article-level identifier + #[serde(rename = "doaj")] + #[serde(skip_serializing_if = "Option::is_none")] + pub doaj: Option<String>, + + /// dblp (https://dblp.uni-trier.de/) paper identifier; eg for conference proceedings + #[serde(rename = "dblp")] + #[serde(skip_serializing_if = "Option::is_none")] + pub dblp: Option<String>, + + /// OAI-PMH identifier; only used when an OAI-PMH record is the only authoritative metadata (eg, journal OAI-PMH feeds w/o DOIs) + #[serde(rename = "oai")] + #[serde(skip_serializing_if = "Option::is_none")] + pub oai: Option<String>, } impl ReleaseExtIds { @@ -5794,6 +5809,9 @@ impl ReleaseExtIds { jstor: None, ark: None, mag: None, + doaj: None, + dblp: None, + oai: None, } } } @@ -5855,6 +5873,21 @@ impl std::string::ToString for ReleaseExtIds { params.push(mag.to_string()); } + if let Some(ref doaj) = self.doaj { + params.push("doaj".to_string()); + params.push(doaj.to_string()); + } + + if let Some(ref dblp) = self.dblp { + params.push("dblp".to_string()); + params.push(dblp.to_string()); + } + + if let Some(ref oai) = self.oai { + params.push("oai".to_string()); + params.push(oai.to_string()); + } + params.join(",").to_string() } } @@ -5879,6 +5912,9 @@ impl std::str::FromStr for ReleaseExtIds { pub jstor: Vec<String>, pub ark: Vec<String>, pub mag: Vec<String>, + pub doaj: Vec<String>, + pub dblp: Vec<String>, + pub oai: Vec<String>, } let mut intermediate_rep = IntermediateRep::default(); @@ -5929,6 +5965,15 @@ impl std::str::FromStr for ReleaseExtIds { "mag" => intermediate_rep .mag .push(String::from_str(val).map_err(|x| format!("{}", x))?), + "doaj" => intermediate_rep + .doaj + .push(String::from_str(val).map_err(|x| format!("{}", x))?), + "dblp" => intermediate_rep + .dblp + .push(String::from_str(val).map_err(|x| format!("{}", x))?), + "oai" => intermediate_rep + .oai + .push(String::from_str(val).map_err(|x| format!("{}", x))?), _ => { return std::result::Result::Err( "Unexpected key while parsing ReleaseExtIds".to_string(), @@ -5953,6 +5998,9 @@ impl std::str::FromStr for ReleaseExtIds { jstor: intermediate_rep.jstor.into_iter().next(), ark: intermediate_rep.ark.into_iter().next(), mag: intermediate_rep.mag.into_iter().next(), + doaj: intermediate_rep.doaj.into_iter().next(), + dblp: intermediate_rep.dblp.into_iter().next(), + oai: intermediate_rep.oai.into_iter().next(), }) } } |