aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-05-16 13:53:46 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-05-16 17:40:08 -0700
commit7ed25a124e91f005b3347924be3783b51b79d197 (patch)
tree6e5d138470a84155df4eb48b5ff86a6e3c48c9ce
parentb12b1fae9677872ecd62eafe4fe58bdf66610075 (diff)
downloadfatcat-7ed25a124e91f005b3347924be3783b51b79d197.tar.gz
fatcat-7ed25a124e91f005b3347924be3783b51b79d197.zip
rust/schema: allow 'retraction' release_type
-rw-r--r--CHANGELOG.md3
-rw-r--r--rust/src/identifiers.rs2
2 files changed, 5 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 79538170..183a7304 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,9 @@ See also:
## [Unreleased]
+- added `retraction` as an allowable `release_type`, for a publication. When
+ used, the `release_type` should also be `retraction`.
+
## [0.2.2] - 2019-05-08
### Fixed
diff --git a/rust/src/identifiers.rs b/rust/src/identifiers.rs
index 88e22960..fead4272 100644
--- a/rust/src/identifiers.rs
+++ b/rust/src/identifiers.rs
@@ -536,6 +536,7 @@ pub fn check_release_type(raw: &str) -> Result<()> {
"editorial",
"letter",
"stub",
+ "retraction",
];
for good in valid_types {
if raw == good {
@@ -551,6 +552,7 @@ pub fn check_release_type(raw: &str) -> Result<()> {
#[test]
fn test_check_release_type() {
assert!(check_release_type("book").is_ok());
+ assert!(check_release_type("retraction").is_ok());
assert!(check_release_type("article-journal").is_ok());
assert!(check_release_type("standard").is_ok());
assert!(check_release_type("journal-article").is_err());