summaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api-spec/src
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-12-31 18:05:24 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-12-31 18:05:26 -0800
commit42ffee8c583729287aed7eaa6df4b7b121c1f7f6 (patch)
tree40afc986b07d6af1f04913b43c20e81dfe38d22a /rust/fatcat-api-spec/src
parent48379975135f470f7e2faac6423c6188e3798b2d (diff)
downloadfatcat-42ffee8c583729287aed7eaa6df4b7b121c1f7f6.tar.gz
fatcat-42ffee8c583729287aed7eaa6df4b7b121c1f7f6.zip
make editor_id optional when createding editgroup
The editor_id can be infered from auth metadata.
Diffstat (limited to 'rust/fatcat-api-spec/src')
-rw-r--r--rust/fatcat-api-spec/src/models.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/rust/fatcat-api-spec/src/models.rs b/rust/fatcat-api-spec/src/models.rs
index 01b4c28e..4d7575b6 100644
--- a/rust/fatcat-api-spec/src/models.rs
+++ b/rust/fatcat-api-spec/src/models.rs
@@ -190,7 +190,8 @@ pub struct Editgroup {
/// base32-encoded unique identifier
#[serde(rename = "editor_id")]
- pub editor_id: String,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub editor_id: Option<String>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
@@ -206,10 +207,10 @@ pub struct Editgroup {
}
impl Editgroup {
- pub fn new(editor_id: String) -> Editgroup {
+ pub fn new() -> Editgroup {
Editgroup {
editgroup_id: None,
- editor_id: editor_id,
+ editor_id: None,
description: None,
extra: None,
edits: None,