From f3523b1d900e19911bf0041ac1c75877b0bfc943 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 25 May 2018 19:42:39 -0700 Subject: return all edits for an editgroup GET --- rust/fatcat-api/README.md | 2 +- rust/fatcat-api/api.yaml | 8 ++++++++ rust/fatcat-api/api/swagger.yaml | 31 +++++++++++++++++++++++++++++++ rust/fatcat-api/src/models.rs | 20 +++++++++++--------- 4 files changed, 51 insertions(+), 10 deletions(-) (limited to 'rust/fatcat-api') diff --git a/rust/fatcat-api/README.md b/rust/fatcat-api/README.md index 364f7271..146758fb 100644 --- a/rust/fatcat-api/README.md +++ b/rust/fatcat-api/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-05-26T01:47:28.955Z +- Build date: 2018-05-26T02:33:00.709Z This autogenerated project defines an API crate `fatcat` which contains: * An `Api` trait defining the API in Rust. diff --git a/rust/fatcat-api/api.yaml b/rust/fatcat-api/api.yaml index cfce24d7..146c11dd 100644 --- a/rust/fatcat-api/api.yaml +++ b/rust/fatcat-api/api.yaml @@ -50,6 +50,10 @@ x-entity-edit-props: &ENTITYEDITPROPS type: integer example: 42 format: int64 + redirect_ident: + type: string + example: "f1f046a3-45c9-4b99-adce-000000000002" + #format: uuid editgroup_id: type: integer example: 16 @@ -174,6 +178,10 @@ definitions: type: string entity_edit: type: object + required: + - edit_id + - ident + - editgroup_id properties: <<: *ENTITYEDITPROPS editor: diff --git a/rust/fatcat-api/api/swagger.yaml b/rust/fatcat-api/api/swagger.yaml index 506cb9db..db7b0e03 100644 --- a/rust/fatcat-api/api/swagger.yaml +++ b/rust/fatcat-api/api/swagger.yaml @@ -1300,6 +1300,10 @@ definitions: upperCaseName: "WORK_ENTITY" entity_edit: type: "object" + required: + - "edit_id" + - "editgroup_id" + - "ident" properties: extra: type: "object" @@ -1307,6 +1311,9 @@ definitions: type: "integer" format: "int64" example: 16 + redirect_ident: + type: "string" + example: "f1f046a3-45c9-4b99-adce-000000000002" revision: type: "integer" format: "int64" @@ -1322,6 +1329,7 @@ definitions: ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 upperCaseName: "ENTITY_EDIT" @@ -1360,55 +1368,65 @@ definitions: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 creators: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 files: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 containers: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 releases: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 description: "description" @@ -1480,55 +1498,65 @@ definitions: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 creators: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 files: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 containers: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 releases: - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 - ident: "f1f046a3-45c9-4b99-adce-000000000001" extra: "{}" edit_id: 847 + redirect_ident: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: 16 revision: 42 upperCaseName: "EDITGROUP_EDITS" @@ -1585,6 +1613,9 @@ x-entity-edit-props: type: "integer" example: 42 format: "int64" + redirect_ident: + type: "string" + example: "f1f046a3-45c9-4b99-adce-000000000002" editgroup_id: type: "integer" example: 16 diff --git a/rust/fatcat-api/src/models.rs b/rust/fatcat-api/src/models.rs index e3ce33c3..68242058 100644 --- a/rust/fatcat-api/src/models.rs +++ b/rust/fatcat-api/src/models.rs @@ -285,30 +285,32 @@ pub struct EntityEdit { pub extra: Option, #[serde(rename = "editgroup_id")] + pub editgroup_id: i64, + + #[serde(rename = "redirect_ident")] #[serde(skip_serializing_if = "Option::is_none")] - pub editgroup_id: Option, + pub redirect_ident: Option, #[serde(rename = "revision")] #[serde(skip_serializing_if = "Option::is_none")] pub revision: Option, #[serde(rename = "ident")] - #[serde(skip_serializing_if = "Option::is_none")] - pub ident: Option, + pub ident: String, #[serde(rename = "edit_id")] - #[serde(skip_serializing_if = "Option::is_none")] - pub edit_id: Option, + pub edit_id: i64, } impl EntityEdit { - pub fn new() -> EntityEdit { + pub fn new(editgroup_id: i64, ident: String, edit_id: i64) -> EntityEdit { EntityEdit { extra: None, - editgroup_id: None, + editgroup_id: editgroup_id, + redirect_ident: None, revision: None, - ident: None, - edit_id: None, + ident: ident, + edit_id: edit_id, } } } -- cgit v1.2.3