diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-12-31 18:05:24 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-12-31 18:05:26 -0800 |
commit | 42ffee8c583729287aed7eaa6df4b7b121c1f7f6 (patch) | |
tree | 40afc986b07d6af1f04913b43c20e81dfe38d22a /rust/fatcat-api-spec | |
parent | 48379975135f470f7e2faac6423c6188e3798b2d (diff) | |
download | fatcat-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')
-rw-r--r-- | rust/fatcat-api-spec/README.md | 2 | ||||
-rw-r--r-- | rust/fatcat-api-spec/api.yaml | 2 | ||||
-rw-r--r-- | rust/fatcat-api-spec/api/swagger.yaml | 2 | ||||
-rw-r--r-- | rust/fatcat-api-spec/src/models.rs | 7 |
4 files changed, 5 insertions, 8 deletions
diff --git a/rust/fatcat-api-spec/README.md b/rust/fatcat-api-spec/README.md index bed47c45..7e946b16 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: 2018-12-31T22:21:53.785Z +- Build date: 2019-01-01T01:45:02.795Z 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 98b9e4b0..80db5074 100644 --- a/rust/fatcat-api-spec/api.yaml +++ b/rust/fatcat-api-spec/api.yaml @@ -445,8 +445,6 @@ definitions: example: "zerocool93" editgroup: type: object - required: - - editor_id properties: editgroup_id: <<: *FATCATIDENT diff --git a/rust/fatcat-api-spec/api/swagger.yaml b/rust/fatcat-api-spec/api/swagger.yaml index 670d3551..12bfe192 100644 --- a/rust/fatcat-api-spec/api/swagger.yaml +++ b/rust/fatcat-api-spec/api/swagger.yaml @@ -7598,8 +7598,6 @@ definitions: upperCaseName: "EDITOR" editgroup: type: "object" - required: - - "editor_id" properties: editgroup_id: type: "string" 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, |